JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tr id="e1" tabindex="0">
<td>Example1</td>
</tr>
<tr id="e2" tabindex="0">
<td>Example2</td>
</tr>
</table>
CSS
table :focus {
background: #DFF0D8;
}
JavaScript
$("#e1").focus();