JSFiddle - React, Tailwind, and code Playground
by raad
HTML
<table>
<tr>
<td class="required">Description</td>
<td>
<input id="input1" />
</td>
<td>Phone</td>
<td>
<input id="input2" />
</td>
</tr>
<tr>
<td class="required">Location</td>
<td>
<select id="select1" />
</td>
<td>Email</td>
<td>
<input id="input3" />
</td>
</tr>
</table>
CSS
.required {
background-color: #fee;
}
JavaScript
$(".required + td").children().each(function (index) {
$(this).css("border", "1px solid #a55");
});