/* Source: http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/html/tests/css3-modsel-28b.html */ .green { background-color : lime ! important } ul > li:nth-child(odd) { background-color : red } ol > li:nth-child(even) { background-color : red } table.t1 tr:nth-child(-n+4) { background-color : red } table.t2 td:nth-child(3n+1) { background-color : red }