You are here:About>Computing & Technology>Web Design / HTML> CSS> Beginning CSS> Beginning Cascading Style Sheets
About.comWeb Design / HTML
Newsletters & RSSEmail to a friendSubmit to Digg
CSS Resource Pages

CSS Style LibraryCSS Links

Beginning Cascading Style Sheets

From Jennifer Kyrnin,
Your Guide to Web Design / HTML.
FREE Newsletter. Sign Up Now!

Learn How to Use CSS

Cascading 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 more control over the layout and design than straight HTML ever did.

Invented in 1997, Cascading Style Sheets (CSS) are widely used among browsers and Web developers are learning to be more comfortable with them. In fact, many tags that used to be the only way to define the look and feel of a page have been replaced by CSS, such as the <font> tag.

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

Cascading Style Sheet 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.

Put the following in the <head> of your HTML document:

<style type="text/css">
h4 { color: #0000ff; }
</style>

Next page > Where do you put your CSS tags? > Page 1, 2, 3, 4

Previous Features

 All Topics | Email Article | | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.