CSS 3 Module <== Test # ==>
W3C Selectors 38 of 146 of the static tests category
Testing Date Revision
:last-child pseudo-class (ID #33) 2001-07-11 1.0
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 align="center">
<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>