JSFiddle - React, Tailwind, and code Playground

by qeremy

HTML

<table id="el" border="1">
    <tr><td>Cell 1</td><td>Cell 2</td></tr>
</table>

JavaScript

jQuery("#el").append("<colgroup><col span=1 style=background-color:red><col style=background-color:yellow></colgroup>")
jQuery("#el").append("<tr><td>Cell 3</td><td>Cell 4</td></tr>")
    
var el = document.getElementById("el")
el.insertBefore(el.getElementsByTagName("colgroup")[0], el.firstChild)