HTML CSS examples for CSS Selector:after
change <tr> color after one another
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> table tr:nth-of-type(odd) { color:Chartreuse; } table tr:nth-of-type(even) { color:yellow; } </style> <!--from ww w. j a v a 2s . c o m--> </head> <body> <table> <tbody> <tr> <td>Lorem</td> </tr> <tr> <td>Lorem</td> </tr> <tr> <td>Lorem</td> </tr> <tr> <td>Lorem</td> </tr> </tbody> </table> </body> </html>