I'm working with a table in HTML that has about 100 rows. I would like to apply different colors to specific groups of rows, such as making rows 1-10 red and rows 20-40 blue.
Using nth-child
seems like an option, but it can get quite verbose if I need to select a larger range of rows, like 20-50. Is there a more efficient way to target rows 20-50 and assign them a color?
<table id="table">
<tr>
<!-- content -->
</tr>
<!-- 100 tr elements here -->
</table>