Is there a way to alternate the background colors of selected groups of 4 rows in a table? I want to make one group red and the next group blue. Any suggestions or ideas on how to achieve this?
<table>
<tr style="background-color: red;">
<td>NAME</td><td>AGE</td>
</tr>
<tr style="background-color: red;">
<td>NAME</td><td>AGE</td>
</tr>
<tr style="background-color: red;">
<td>NAME</td><td>AGE</td>
</tr>
<tr style="background-color: red;">
<td>NAME</td><td>AGE</td>
</tr>
<tr style="background-color: blue;">
<td>NAME</td><td>AGE</td>
</tr>
<tr style="background-color: blue;">
<td>NAME</td><td>AGE</td>
</tr>
<tr style="background-color: blue;">
<td>NAME</td><td>AGE</td>
</tr>
<tr style="background-color: blue;">
<td>NAME</td><td>AGE</td>
</tr>
<tr style="background-color: red;">
<td>NAME</td><td>AGE</td>
</tr>
<tr style="background-color: red;">
<td>NAME</td><td>AGE</td>
</tr>
<tr style="background-color: red;">
<td>NAME</td><td>AGE</td>
</tr>
<tr style="background-color: red;">
<td>NAME</td><td>AGE</td>
</tr>