JSFiddle - React, Tailwind, and code Playground

HTML

<table border=1>
<tr><td>r1c1</td><td>r1c2</td><td>r1c3</td><td>r1c4</td><td>r1c5</td><td>r1c6</td><td>r1c7</td><td>r1c8</td><td>r1c9</td><td>r1c10</td></tr>
<tr><td>r2c1</td><td>r2c2</td><td>r2c3</td><td>r2c4</td><td>r2c5</td><td>r2c6</td><td>r2c7</td><td>r2c8</td><td>r2c9</td><td>r2c10</td></tr>
<tr><td>r3c1</td><td>r3c2</td><td>r3c3</td><td>r3c4</td><td>r3c5</td><td>r3c6</td><td>r3c7</td><td>r3c8</td><td>r3c9</td><td>r3c10</td></tr>
<tr><td>r4c1</td><td>r4c2</td><td>r4c3</td><td>r4c4</td><td>r4c5</td><td>r4c6</td><td>r4c7</td><td>r4c8</td><td>r4c9</td><td>r4c10</td></tr>
<tr><td>r5c1</td><td>r5c2</td><td>r5c3</td><td>r5c4</td><td>r5c5</td><td>r5c6</td><td>r5c7</td><td>r5c8</td><td>r5c9</td><td>r5c10</td></tr>
</table>

CSS

/* If you want to color cell 2 and cell 5 of the row under mouse pointer */
/*
tr:hover td:nth-of-type(2), tr:hover td:nth-of-type(5) {
  background-color: teal;
}
*/

/* If you want to color the cell under mouse pointer and cell 5 of the row under mouse pointer */
/*
td:hover, tr:hover td:nth-of-type(5) {
  background-color: teal;
}
*/

/* If you want to color cell 5 of the row under mouse pointer only when cell 2 is under the mouse pointer */
/*
td:nth-of-type(2):hover+td+td+td {
  background-color: teal;
}
*/

JavaScript

/*

uncomment the CSS rules ( top right area ) one by one
and press the Run ( top button bar ) for each
to see the differences

*/