JSFiddle - React, Tailwind, and code Playground

HTML

<table border="1">
  <thead>
    <tr>
      <th>Heading 1</th>
      <th>Heading 2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Lorem ipsum 1</td>
      <td>Lorem ipsum 2</td>
    </tr>
    <tr>
      <td>Lorem ipsum 3</td>
      <td>Lorem ipsum 4</td>
    </tr>
    <tr>
      <td>Lorem ipsum 5</td>
      <td>Lorem ipsum 6</td>
    </tr>
    <tr>
      <td>Lorem ipsum 7</td>
      <td>Lorem ipsum 8</td>
    </tr>
  </tbody>
</table>

CSS

tr:nth-child(even) {
  background: wheat;
}

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

tbody tr:first-of-type,
thead tr:first-of-type {
  background-color: yellow;
}

thead+tbody tr:first-of-type {
  background-color: plum;
}