Pseudo-class:
first-child

Support Key: [CSS2] [N6|O7]
Other Document-Tree
Pseudo-Classes

root
empty
not
first-node
last-child
last-node
lang
= Index DOT Css by Brian Wilson =
Main Index | Property Index | CSS Support History | Browser History



   Quick Statistics   
Applicable Elements:
Any
HTML Equivalent:
NA
What is it?
The First-child Pseudo-class selects an element context that is the first child node of another selector in the document element tree. This meaning may be clear, but the targets (which is the child element, and which is the parent) may be confusing. If a selector looks like this: "strong:first-child", it means "all STRONG elements that are the first-child node of other elements, NOT "all first-child nodes of STRONG elements." If you want to specify all first-child nodes of STRONG elements, the syntax would look like: "strong :first-child" (notice the space in there indicating a descendent selector.)
Example
Ext/Doc: p a:first-child { color: green }
(selects the first hyperlink child element of any P elements and turns the content green.)
In-Line:  NA
Browser Peculiarities

Boring Copyright Stuff....