CSS 3 Module <== Test # ==>
W3C Selectors 19 of 153 of the static tests category
Testing Date Revision
ID selectors (ID #15) 2001-11-19 1.1
li { background-color : red }
#t1 { background-color : lime }
li#t2 { background-color : lime }
li#t3 { background-color : lime }
#t4 { background-color : red }
<ul>
  <li id="t1">This list item should have a green background. because its ID is &quot;t1&quot;</li>
  <li id="t2">This list item should have a green background. because its ID is &quot;t2&quot;</li>
  <li id="t3"><span id="t44">This list item should have a green background. because the inner SPAN does not match &quot;#t4&quot;</span></li>
</ul>