JSFiddle - React, Tailwind, and code Playground
HTML
<fieldset id="myFieldSet">
</fieldset>
JavaScript
function buttonClicked() {
var el = document.createElement("<p>");
el.appendChild(document.createTextNode("Test");
var tmp = document.createElement("div");
tmp.appendChild(el);
var fieldSet = document.getElementById("myFieldSet");
fieldSet.innerHTML = tmp.innerHTML;
}