JSFiddle - React, Tailwind, and code Playground

HTML

<div>text</div>

CSS

div, table {
    background: yellow;
}
table {
    width: 100%;
}
td {
    text-align: center;
}

JavaScript

var text = jQuery("div").text();
var table = jQuery("<table><tr></tr></table>").get(0);
var row = table.rows[0];
for (var i = 0; i < text.length; i++) {
    var cell = row.insertCell(-1);
    jQuery(cell).text(text[i]);
}
jQuery("div").replaceWith(table);