HTML 4 home

 


A really simple example of style sheets

World's fastest and shortest introduction to style sheets

A bit more explanation about style sheets

Path animations with HTML 4




Classes home

HTML Info home

 

HTML 4

Jeff Williamson
Northern Virginia Community College
www.nvcc.edu/home/nvwillj/html4/


World's fastest and shortest introduction to style sheets

Style sheets take some reading up on and getting used to. Then by the time you learn them, you're site's built and you'll have to go back and redo the whole thing to use style sheets.

This page will explain how to (1) create a style sheet, (2) store and link it to your files, and (3) get a neat, cheap effect for Internet Explorer users.

1. How to create a style sheet:

a. Open Notepad
b. Copy the three lines below:

A:hover {
Color : #FF0000 ! important;
}

c. save it as genstyle.css in your homepage directory

2. How to link a style sheet to your pages

Add this line to each page you write:

<head>
<title>My title</title>
<link rel="stylesheet" href="genstyle.css">
</head>

3. What it does

Internet Explorer users will see your text links change to red when their mouses pass over them. Netscape users see nothing. There is no effect on download time, and no re-coding needs to be done.

Aside from how worthwhile this effect is, now you have your pages linked to a style sheet. When you learn about style sheets later on, you won't have to go back and add that line everywhere.