JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<thead>
<th>id</th>
<th>name</th>
<th>number</th>
<th>result</th>
</thead>
<tbody>
<tr>
<td>stuff</td>
<td>stuff</td>
<td>stuff</td>
<td>stuff</td>
</tr>
</tbody>
</table>
CSS
.red {
background-color:red;
}
JavaScript
var resultHeaderIndex = $('th:contains("result")')
.addClass('red')
.index();
$('td:nth-child(' + (resultHeaderIndex + 1) + ')').addClass('red')