| <csstest def=":first-child pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="32" rev="1.0" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests"> |
| |
| <author>Daniel Glazman</author> |
| <cssrules>.red { background-color : red } |
| .t1 td:first-child { background-color : lime } |
| p > *:first-child { background-color : lime } |
| </cssrules> |
| |
| <code> |
| <div xmlns="http://www.w3.org/1999/xhtml"> |
| <table class="t1" border="1"> |
| <tr> |
| <td class="red">green cell</td> |
| <td>1.2</td> |
| <td>1.3</td> |
| </tr> |
| <tr> |
| <td class="red">green cell</td> |
| <td>2.2</td> |
| <td>2.3</td> |
| </tr> |
| <tr> |
| <td class="red">green cell</td> |
| <td>3.2</td> |
| <td>3.3</td> |
| </tr> |
| </table> |
| </div> |
| <p xmlns="http://www.w3.org/1999/xhtml">This paragraph contains some text |
| <span>and a span that should have a green background</span> |
| </p> |
| </code> |
| </csstest> |