JSFiddle - React, Tailwind, and code Playground
HTML
Has no header. Data rows start with red color as they should
<table>
<tr>
<td>data</td>
</tr>
<tr>
<td>data</td>
</tr>
</table>
<br>
This table has a header and the data rows start with blue instead. They need to start with red.
<table>
<tr>
<th>Has Header </th>
</tr>
<tr>
<td>data</td>
</tr>
<tr>
<td>data</td>
</tr>
</table>
CSS
tr:nth-child(odd) td { background-color:red; }
tr:nth-child(even) td { background-color:blue; }
tr th { background-color: yellow}
table {
border: 1px solid black;
margin: 10px;
width: 100px;
}