CSS 3 Module <== Test # ==>
W3C Selectors 109 of 148 of the static tests category
Testing Date Revision
:empty pseudo-class and XML/SGML constructs (ID #150) 2001-11-15 1.0
This line should have a green background.

(Note. This test is based on an controversial and unpublished clarification to the spec and is included for completeness only. Without the clarification, the spec says this test should be red, not green.)

 address:empty { background: lime; }
 address { background: red; margin: 0; height: 1em; }
 .text { margin: -1em 0 0 0; }
 <address><!-- --><?test random PI></address>
 <div class="text">This line should have a green background.</div>

 <p>(Note. This test is based on an <a href="http://lists.w3.org/Archives/Member/w3c-css-wg/2001OctDec/thread.html#140">controversial and unpublished clarification to the spec</a> and is included for completeness only. Without the clarification, the spec says this test should be red, not green.)</p>