CSS 3 Module <== Test # ==>
W3C Selectors 73 of 78
Testing Date Revision
:contains() pseudo-class (ID #84) 11-july-2001 1.0

This paragraph should have a green background

  • All this list, including bullets, should have a gr
  • een background
div.stub *:contains("green") { background-color : lime }
.red { background-color : red }
<div class="stub">
  <p class="red">This paragraph should have a green background</p>
  <ul class="red">
    <li>All this list, including bullets, should have a gr</li>
<li>een background</li>
  </ul>
</div>