Usage<!-- HTML -->
<div>
<p>This is the first child, and will have a green background</p>
<p>Not the first child</p>
<p>Not the first child</p>
</div>
/* CSS */
p:first-child {
background: green;
}Browser compatibility| Test | IE8 | IE7 | FF3 | FF2 | Saf3 | Opera9.5 |
Further reading
|