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

This paragraph should have a green background.

  • All this list, including bullets
  • and all text, should be green.
div.stub *:not(:contains("red")) { 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</li>
    <li>and all text, should be green.</li>
  </ul>
</div>