JSFiddle - React, Tailwind, and code Playground
HTML
<table class="table1">
<tr>
<th>Name</th>
<th>Surname</th>
<th>Email</th>
</tr>
<tr>
<td>Mathew</td>
<td>Thompson</td>
<td>1</td>
</tr>
<tr>
<td>Hayley</td>
<td>P</td>
<td>2</td>
</tr>
<tr>
<td>Susie</td>
<td>J</td>
<td>3</td>
</tr>
<tr>
<td>Sandra</td>
<td>L</td>
<td>4</td>
</tr>
<tr>
<td>Terry</td>
<td>T</td>
<td>5</td>
</tr>
<tr>
<td>Jerry</td>
<td>F</td>
<td>6</td>
</tr>
</table>
CSS
tr:nth-child(2)
{
background-color: red;
}
tr:nth-child(3)
{
background-color: blue;
}
tr:nth-child(4)
{
background-color: green;
}
tr:nth-child(5)
{
background-color: yellow;
}
tr:nth-child(6)
{
background-color: orange;
}
tr:nth-child(7)
{
background-color: purple;
}