eg: UK or Brides UK or Classical Art or Buy Music or Spirituality
 
eg: UK or Brides UK or Classical Art or Buy Music or Spirituality
 

Your Online Guide » Guide to Technology » Web Site Development

[C246]Cascading Style Sheets Css
by Sebastian De Masi, Seb
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:

<'font color="blue size=12pt'> 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:

<'p class=titles> 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 De Masi has sinced written about articles on various topics from Web Development, Site Promotion. For more information visit http://www.06webdesign.com. Sebastian De Masi's top article generates over 4400 views. to your Favourites.
EditorialToday Guide to Technology has 3 sub sections. Such as Technology, Increase Adsense Revenue and Information & Technology. With over 20,000 authors and writers, we are a well known online resource and editorial services site in United Kingdom, Canada & America . Here, we cover all the major topics from self help guide to A Guide to Business, Guide to Finance, Ideas for Marketing, Legal Guide, Lettre De Motivation, Guide to Insurance, Guide to Health, Guide to Medical, Military Service, Guide to Women, Pet Guide, Politics and Policy , Guide to Technology, The Travel Guide, Information on Cars, Entertainment Guide, Family Guide to, Hobbies and Interests, Quality Home Improvement, Arts & Humanities and many more.
About Editorial Today | Contact Us | Terms of Use | Submit an Article | Our Authors