CSS 3 Module <== Test # ==>
W3C Selectors 216 of 276 of the static tests category
Testing Date Revision
:nth-child() pseudo-class with hidden elements (ID #146a) 2002-10-09 1.1

NOTE: The UA must support namespaces for this test.

This line should be unstyled. This line should be green. This line should be unstyled. This line should be unstyled. This line should be green. This line should be unstyled. This line should be green. This line should be unstyled. This line should be unstyled. This line should be green. This line should be unstyled. This line should be unstyled. This line should be unstyled. This line should be green. This line should be unstyled. This line should be unstyled. This line should be green. This line should be unstyled.
  line { display: block; }
  [type~=match] { background: red; }
  line:nth-child(3n-1) { background: lime; }
  [hidden] { display: none; }
 <test xmlns="http://www.example.org/">
  <line type="">This line should be unstyled.</line>
  <line type="match">This line should be green.</line>
  <line type="">This line should be unstyled.</line>
  <line type="">This line should be unstyled.</line>
  <line type="match">This line should be green.</line>
  <line type="">This line should be unstyled.</line>
  <line type="" hidden="hidden">This line should be unstyled.</line>
  <line type="match">This line should be green.</line>
  <line type="">This line should be unstyled.</line>
  <line type="">This line should be unstyled.</line>
  <line type="match">This line should be green.</line>
  <line type="">This line should be unstyled.</line>
  <line type="" hidden="hidden">This line should be unstyled.</line>
  <line type="match" hidden="hidden">This line should be green.</line>
  <line type="">This line should be unstyled.</line>
  <line type="">This line should be unstyled.</line>
  <line type="match">This line should be green.</line>
  <line type="">This line should be unstyled.</line>
  <line type="">This line should be unstyled.</line>
  <line type="match">This line should be green.</line>
  <line type="">This line should be unstyled.</line>
 </test>