Remember Me
forgot your password?

What are Cascading Style Sheets (CSS)

Cascading Style Sheets, also known as CSS, are the most popular and neat way of formatting an html page.

There are two versions of Cascading Style Sheets (CSS). CSS Level 1 was launched in 1996 and is supported by all browsers. This version is the older of the two and is used mostly for font formatting, text alignment and line spacing.

CSS version 2 came out in 1998. This one is a lot more powerful than its predecessor allowing you not only to format text but also to position elements on your web page. This version of CSS is so powerful that all good web designers use it instead of using html tables.

The word Cascading reflects how style sheets work. An Html document can be linked to several style sheets, for example it could be linked to 2 sheets, an internal style sheet (styles within the head tag of a html document) and an external style sheet (a .css document).

An important aspect of Cascading Style Sheets is the operation of inheritance. If a certain aspect of formatting is not specified for a child element, it will inherit the formatting of its parent element.

When you use CSS, you can avoid the use of most html format tags making your code much easier to read. Here’s an example:

If we want to have a Blue size 12pt title at the start of a every article on our web site we would have something like this in our html code:

title

You might be thinking “that doesn’t look too bad”… but what happens if you have 50 titles throughout your site? You would have to repeat this process over and over again, and you will be at risk of using different formats for your titles and by doing so breaking the consistency of your design. Not only that, if you decide to change the color or font of all your titles you would have to go through the process of changing all 50 font tags…

Here’s when CSS comes in handy!!! Instead of using font tags for my titles I would use this:

In a separate .css document I would add a new style called “titles”. It would look something like this:

.title { font-size 12pt; color:blue;}

and in my html I would replace my font tags with:

Title

And voila!!! All titles that are within the titles class will be formatted in the same way. The beauty of style sheets is that they can be linked to as many web pages as you want making the whole process of adding more content to you site a whole lot easier.

Sebastian

Sebastian De Masi is the Founder of 06WebDesign.com. 06WebDesign.com provides resources to help you create an effective and lucrative online solution for your business and establish an online presence amongst the most reputable companies World wide.

For more information visit http://www.06webdesign.com

Rate this Article: 0 / 5 stars - 0 vote(s)
Print Email Re-Publish

Add new Comment



Captcha

  • Latest Programming Articles
  • More from Sebastian

Magento Development

By: Digisha Modi | 26/12/2009
Magento eCommerce Development is an incredibly advanced suite which enables you to have a shopping cart up and running in a very short time. Magento includes advanced reporting and analysis features which will increase your awareness of sales trends and other customer activity to enable you to tune your business for maximum efficiency. Its unique characteristics are unlimited flexibility, completely scalable architecture, professional and community support and smooth integration with 3rd party a

PSD to XHTML Conversion Services

By: Digisha Modi | 26/12/2009
To make a website easily visible and popular, making it browser compatible is very important. For this PSD to XHTML conversion is one of the most vital elements of Web designing. Its growing importance in the designing cannot be completely annulled. With the increasing competition among the web marketers, the importance of a good design with better usability has become the necessity of the present time.

Magento Extension Development

By: Digisha Modi | 26/12/2009
Magento is a feature-rich, professional open-source eCommerce solution that offers merchants complete flexibility and control over the look, content, and functionality of their online store. Magneto’s intuitive administration interface contains powerful marketing, search engine optimization and catalog-management tools to give merchants the power to create sites that are tailored to their unique business needs.

How to burn WMV video to DVD to enjoy on TV, xobx, PS 3 or other playwers

By: lyndon123 | 26/12/2009
WMV video is a one of the most pop format video we often use. Enjoy the WMV video on TV, Xbox, PS 3 or other DVD Players is often necessary in our common life. Now we can follow this simple guide to learn how to burn WMV to DVD Disc.

Mobile antivirus software is beginning to be an essential

By: brookepens | 25/12/2009
When it comes to our home computers and networks in the work place everyone ensures that they are protected by mobile antivirus software with protective firewalls. Unfortunately, there are still many people and businesses that do not realise that mobile phone antivirus software has become just as important to have as antivirus computer software.

NetOffice Customization

By: Digisha Modi | 25/12/2009
NetOffice is a web based project management tools written in PHP and utilizing MySQL. It has a surprisingly easy to use user interface, and it really is self explanatory, even for first time users. It has the same features as most other free web based project management tools but is set apart from the pack by its simple layout and amazing ease of use.

SugarCRM Development Services

By: Digisha Modi | 25/12/2009
SugarCRM is commercial open source Customer Relationship Management software that is designed to meet all the CRM requirements of organizations. It is developed using PHP and available in both free and commercial editions. It provides basic CRM functionality such as lead tracking, sales management, project management, issue tracking etc.

Magento - Best Choice for Ecommerce Solution

By: Digisha Modi | 24/12/2009
Magento eCommerce is a new Open Source platform with industry-leading features to provide merchants with unprecedented control over store operations. This Open Source eCommerce software is very powerful and includes many features that have not been seen in Open Source products before. Magento eCommerce is one of the fastest growing new software, and looks set to become a dominant force in the eCommerce industry.

History of the Internet

By: Sebastian | 30/07/2007 | Internet
The main goal of this system was to provide a stable communication network that would work even if some of the sites were destroyed in case of a nuclear attack. Unlike the current browsing, the internet back in the early stages could only be used by computer experts and highly qualified professionals such as engineers, scientists and librarians.

Increase the Number of Targeted Traffic in a Day Using Free Services

By: Sebastian | 29/07/2007 | Online Promotion
Would you believe me if I told you that there is a way to start getting targeted visitors today… and without spending a cent?

How to Reach Qualified Prospects Through your Website

By: Sebastian | 22/07/2007 | Online Promotion
Without traffic you will never make money, simple as that!!! There are many ways of driving traffic to your website. Here’s a list of the most popular and effective methods:

Web Design to Boost your Business

By: Sebastian | 22/07/2007 | Online Business
The first thing you must do before building a website is to identify your market and their needs. Once done its time to develop an online presence on the internet.

How to Design a Lucrative Online Business

By: Sebastian | 22/07/2007 | Online Business
Thanks to the easy accessibility and affordability of the internet, electronic commerce has dominated the marketing practice. With very little knowledge now a person can setup their very own online business in days and start selling products to clients even in the most remote areas of the planet.

Increase your Targeted Traffic by Offering Free Content

By: Sebastian | 22/07/2007 | Online Promotion
If you want to build targeted traffic to your site you have to think outside the box. Search Engine Rankings and Advertising campaigns are not the only ways to drive people to look at you site. By adding free downloads you will attract visitors by hundreds, if not thousands.

How to Appear in Google on Days

By: Sebastian | 11/07/2007 | SEO
I was comparing different methods to build traffic and I came across one that worked wonders for me and it’s absolutely free!!!

Submit Your Articles Free: Signup
Article Categories




Use of this web site constitutes acceptance of the Terms Of Use and Privacy Policy | User published content is licensed under a Creative Commons License.
Copyright © 2005-2008 Free Articles by ArticlesBase.com, All rights reserved. (1.08, 1, w3)