Special HTML Selectors
= Index DOT Css by Brian Wilson =

Main Index | Property Index | CSS Support History | Browser History
What Are They?
These Selector syntax forms existed in CSS1 and were specifically meant to target HTML, although at least the ID syntax can be generalized for use with other languages as well.
Class Selectors
[CSS1|CSS2|CSS2.1|CSS3] [IE3|N4|O3.5|S1]
Description:
This selector matches the value of the HTML 'CLASS' attribute. It is referenced by preceding the value with a period character (".") The effect of this selector can also be achieved using an Attribute Value Selector, and both have the same cascading precedence.
Syntax:
.[Class Name] { [Declaration Block] }
Example:
.redtags { color: red } [All tags in CLASS 'redtags']
H1.redtags { color: red } [All Heading Level 1 tags in CLASS 'redtags']
ID Selectors
[CSS1|CSS2|CSS2.1|CSS3] [IE3|N4|O3.5|S1]
Description:
This selector was designed to match the value of the HTML 'ID' attribute, but SGML/XML both allow the ID attribute value type. With this type of attribute, each element in a document can have a uniquely referenceable label. This Selector syntax precedes the attribute value with a pound symbol ("#".) An element name or Universal Selector may be used in front of the ID Selector, but it is not necessary. The effect of this selector can also be achieved using an Attribute Value Selector, but this form of Selector has a higher cascading precedence.
Syntax:
#[ID Label] { [Declaration Block] }
Example:
#foobar { color: red } [Applies a red text color to the tag instance with the "foobar" ID value]
Notes Browser Peculiarities

Boring Copyright Stuff....