JSFiddle - React, Tailwind, and code Playground

HTML

<table>
       <tr>
          <th>NAME</th><th>00:00</th><th>00:20</th><th>00:40</th><th>01:00</th><th>01:20</th><th>etc</th>
       </tr>
       <tr id="row1">
          <th>item</th>
          <td colspan="2">itemA</td>
          <td colspan="3"></td>
       </tr>
       <tr>
          <th>item</th>
          <td colspan="3">itemAB</td>
          <td colspan="2">itemA</td>
        </tr>
       <tr>
          <th>item</th>
          <td colspan="2"></td>
          <td colspan="2">itemABC</td>
        </tr>
    </table>

JavaScript

$("#row1 td:contains('itemA')").css("background-color", "lightBlue");
        $("#row1 td:contains('itemAB')").css("background-color", "yellow");
        $("#row1 td:contains('itemABC')").css("background-color", "lightGreen");
        $("#row1 td:empty").css("background-color", "Black");