Introduction

Sometimes, we have to highlight the alternate rows of an HTML table to get the attention of the user on important data. There are many ways to highlight the alternate rows, but the easiest way is using the CSS style selector which does not require any scripting code such as JavaScript or jQuery.

The CSS provides the nth-child() selector which supports the odd and even keyword. It also supports arithmetic operators

#css #html #highlight

Highlight HTML Table Alternate Row Colors Using CSS Selector
2.20 GEEK