Style Sheets - Part 3

Cascading Style Sheets (CSS) provide a mechanism for specifying the style of specific elements within an HTML document. Unlike the previous page, style sheets allow the attributes on an element to specified in advance and applied to all occurences of an element within a document.

As a simple example, suppose that you wanted to make all of the text inside <H3> tags blue. To do this, you could include stylesheet information in the document header like this:

<HTML>
<HEAD>
<TITLE>A Brief Introduction to Style Sheets</TITLE>
<STYLE type="text/css">
   H3 {color:blue}
</STYLE>
</HEAD>
Now, let's take a look at the resulting Hn elements:

I'm an H1 element

I'm an H2 element

I'm an H3 element

I'm an H4 element

I'm an H5 element
I'm an H6 element
Well, how about that--it seems to work.

Next