CSS 3 Module <== Test # ==>
W3C Selectors 108 of 179
Testing Date Revision
:contains() pseudo-class (ID #84) 2005-09-29 1.2

There is no disagreement over the fact that this paragraph should have a green background.

  • All the text in this list should have a
  • green background throughout as well.
div.stub *:contains("agree") { background-color : lime }
.red { background-color : red }
 <div class="stub">
  <p class="red">There is no disagreement over the fact that this paragraph should have a green background.</p>
  <ul class="red">
   <li>All the text in this list should have a</li><li>green background throughout as well.</li>
  </ul>
 </div>