CSS 3 Module <== Test # ==>
W3C Selectors 93 of 140 of the static tests category
Testing Date Revision
:contains() pseudo-class (ID #84b) 12-november-2001 1.1

This paragraph should have a green background.

  • This list should also have a
  • green background throughout.
.green { background-color : lime }
div.stub *:contains("agree") { background-color : red }
 <div class="stub">
  <p class="green">This paragraph should have a green background.</p>
  <ul class="green">
   <li>This list should also have a</li>
<li>green background throughout.</li>
  </ul>
 </div>