table#checkerboard tr:nth-child(even) td:nth-child(even), table#checkerboard tr:nth-child(odd) td:nth-child(odd) {color: black; background: white;} table#checkerboard tr:nth-child(even) td:nth-child(odd), table#checkerboard tr:nth-child(odd) td:nth-child(even) {color: white; background: black;}
r1c1 | r1c2 | r1c3 | r1c4 | r1c5 | r1c6 | r1c7 | r1c8 |
r2c1 | r2c2 | r2c3 | r2c4 | r2c5 | r2c6 | r2c7 | r2c8 |
r3c1 | r3c2 | r3c3 | r3c4 | r3c5 | r3c6 | r3c7 | r3c8 |
r4c1 | r4c2 | r4c3 | r4c4 | r4c5 | r4c6 | r4c7 | r4c8 |
r5c1 | r5c2 | r5c3 | r5c4 | r5c5 | r5c6 | r5c7 | r5c8 |
r6c1 | r6c2 | r6c3 | r6c4 | r6c5 | r6c6 | r6c7 | r6c8 |
r7c1 | r7c2 | r7c3 | r7c4 | r7c5 | r7c6 | r7c7 | r7c8 |
r8c1 | r8c2 | r8c3 | r8c4 | r8c5 | r8c6 | r8c7 | r8c8 |
table#alt-row {background: white;} table#alt-row tr:nth-child(3n+1) {background: silver;} table#alt-row td:nth-child(2n+4) {font-weight: bold; font-style: italic;}
r1c1 | r1c2 | r1c3 | r1c4 | r1c5 | r1c6 | r1c7 | r1c8 |
r2c1 | r2c2 | r2c3 | r2c4 | r2c5 | r2c6 | r2c7 | r2c8 |
r3c1 | r3c2 | r3c3 | r3c4 | r3c5 | r3c6 | r3c7 | r3c8 |
r4c1 | r4c2 | r4c3 | r4c4 | r4c5 | r4c6 | r4c7 | r4c8 |
r5c1 | r5c2 | r5c3 | r5c4 | r5c5 | r5c6 | r5c7 | r5c8 |
r6c1 | r6c2 | r6c3 | r6c4 | r6c5 | r6c6 | r6c7 | r6c8 |
r7c1 | r7c2 | r7c3 | r7c4 | r7c5 | r7c6 | r7c7 | r7c8 |
r8c1 | r8c2 | r8c3 | r8c4 | r8c5 | r8c6 | r8c7 | r8c8 |
div.typetest p:first-of-type {color: gray; background: cyan;} div.typetest p:not-first-of-type {font-style: italic;} div.typetest p:last-child {text-decoration: underline;} div.typetest p:not(:last-child) {border: 2px dotted purple;}
This is a paragraph which is first in the DIV.
Another paragraph.
And yet another paragraph.