CSS 3 Module <== Test # ==>
W3C Selectors 47 of 182
Testing Date Revision
:last-child pseudo-class (ID #33) 2004-03-03 1.1
1.1 1.2 green cell
2.1 2.2 green cell
3.1 3.2 green cell

This paragraph contains a span that should have a green background and some text after it.

.red { background-color : red }
.t1 td:last-child { background-color : lime }
p > *:last-child { background-color : lime }
<div>
<table class="t1" border="1">
  <tr>
    <td>1.1</td>
    <td>1.2</td>
    <td class="red">green cell</td>
  </tr>
  <tr>
    <td>2.1</td>
    <td>2.2</td>
    <td class="red">green cell</td>
  </tr>
  <tr>
    <td>3.1</td>
    <td>3.2</td>
    <td class="red">green cell</td>
  </tr>
</table>
</div>
<p>
<span>This paragraph contains a span that should
     have a green background</span> and some text after it.</p>