JSFiddle - React, Tailwind, and code Playground

HTML

<table id="numlist">
    <thead>
        <th>color</th>
    </thead>
    <tbody>
        <tr>
            <td>one</td>
        </tr>
        <tr>
            <td>two</td>
        </tr>
    </tbody>
</table>
<a href="#" id="add">add</a>

CSS

.newrow {
    background-color: red;
}

JavaScript

$("#add").click(function (event) {
        
        event.preventDefault();
        $("#numlist").prepend("<tr class='newrow'><td>somenum</td></tr>");
    });