Search over 1.4 million articles by over 600 experts
  1. Home
  2. Computing & Technology
  3. Web Design / HTML

More from About.com

Browse Topics A-Z

CSS 101

Lesson 1: What are Cascading Style Sheets

By Jennifer Kyrnin, About.com

Style sheets are a very powerful tool for the Web site developer. They give you the chance to be completely consistent with the look and feel of your pages, while giving you much more control over the layout and design than straight HTML ever did.

Invented in 1997, Cascading Style Sheets (CSS) are just now starting to be widely used among browsers and Web developers are learning to be more comfortable with them. Those of you who use HomeSite 4.0 know that they are eventually going to take the place of tags such as <font>, which have been deprecated in HTML 4.0.

There are three parts to CSS: the styles, their placement, and the fact that they can cascade.

The Styles

One of the more common styles applied to HTML is the color and size of text. In HTML 3.2 you would create a blue H4 headline like this:

<font color="#0000ff"><h4>a blue headline</h4></font>

However, there was no way to ensure that all H4 headlines were blue except by typing in the font tag before and after each one. With CSS, you simply declare that all H4 headlines are blue, and for all pages that use that style sheet and all elements that use that style, they will be blue. Try adding this to your Web page:

<h4 style="color: #0000ff;">another blue headline</h4>

Next Page: Placement of CSS Elements > 1, 2, 3, 4, 5

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2008 About.com, a part of The New York Times Company.

All rights reserved.