JSFiddle - React, Tailwind, and code Playground

HTML

<table>
  <tr>
    <th>Fruit</th>
    <th>Quantity</th>
    <th>Price</th>
  </tr>
  <tr>
    <td>Apples</td>
    <td>48</td>
    <td>0.29</td>
  </tr>
  <tr>
    <td>Bananas</td>
    <td>48</td>
    <td>0.29</td>
  </tr>
  <tr>
    <td>Oranges</td>
    <td>48</td>
    <td>0.29</td>
  </tr>
</table>

CSS

table {
  border: 1px solid black;
  font-family: Arial;
}

tr:nth-child(odd) {
  background-color:red;
}

tr td:nth-of-type(even) {
  background-color: blue;
}