CSS
Tutorial

In this tutorial we will describe how to create an external cascading style sheet.  CSS rules that are located in an external file may be linked to one or all of your pages of one web site and saved as text with the file extention of ".css".  Cascading Style Sheets is a list or series of statements or a rule set.  This is several declarations enclosed in a block.  Don't forget to surround the block with a set of braces.  Blocks can be nested but every left brace must have a right ending brace to go with it.
An example of this is:
H3{
font-family:Verdana, Arial, Geneva;
text-align: center;
color:black;
}

The H3 is the selector and everything else within the braces are declarations or directives.  A CSS rule list is composed of both classes and pseudo-classes.
Pseudo-classes are anchor tags, when they are a link, a visited link or when you come over the top of the link and hover.
Examples of pseudo-classes:

A: LINK
A:VISITED
A:HOVER

You can even create your own classes.  You just have to preface your created selector with a period.
An example of a pseudo class is:

.weird{ color:hotpink;}

There are also elements and pseudo-elements.  Unfortunately, current browsers do not support pseudo-elements at this time.  Remember, the purpose of an external rules file is to create consistency over the course of several documents.
This is a link to a PDF file that is an example of an external css page called text.css

 

Created by
Jill Weinstein
Contact Webmaster
last modified:
December 22, 2002
©Copyright 2000-2002