Cascading Style Sheets
What are they?
Cascading Style Sheets (CSS) are code pages that provide a simple and logical way to format your web documents. You can use css commands with your already existing html tags to extend the design capabilities of html. You can make classes and sub classes for organization and to have code that is easier to read and comprehend.
The Basics
Syntax:
[class name]{attribute:value;}
Linking:
The most important aspect of CSS is the ability to format multiple pages with a single CSS document. This requires you to link your html documents to this CSS document. The tag for this is as follows:
<link href='relative or absolute path to css file' type='text/css' rel='stylesheet' />
Classes & ID's
Classes and ID's are the different types of formatting you define for the elements on the page. You can use one class to format multiple elements on your html page and/or define multiple classes to give different elements on your page a specific style. There is really no functional difference between using classes and id's in your stylesheets other than that ID's
should be used for elements that appear once on a page (for example, the #content div's that appear in Dreamweaver projects). Following this rule will also be helpful when working with javascript.
Next: Writing Your Own Code