I love that CSS3 allows zebra-striping of tables using the
nth-child() selector. Achieving this in plain HTML is a messy manual process that must be repeated should the contents / row-order of the table change. The CSS solution is far easier to implement. The
nth-child() selector can be a number, a keyword, or a formula.
Hop on over to the Codepen to play around:
Read more about the CSS’s :nth-child() selector here: https://www.w3schools.com/cssref/sel_nth-child.asp