HTML CSS examples for CSS Selector:nth-of-type
use :not selector with :nth-of-type
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .new-items-table tr:nth-of-type(even) { background-color:Chartreuse; } </style> <!--from w w w . j a v a 2s. c om--> </head> <body> <table class="new-items-table"> <thead> <tr> <th>Lorem </th> </tr> </thead> <tbody> <tr> <td>L</td> </tr> <tr> <td>L</td> </tr> <tr> <td>L</td> </tr> </tbody> </table> </body> </html>