JSFiddle - React, Tailwind, and code Playground

HTML

<div id="currentElement">
  <div>
    <h2>
    Hello test
    </h2>
  </div>
</div>

JavaScript

var newHtml = "<div><h3>hello test continued</h3></div>";
    var child = document.createElement('div');
    child.innerHTML = newHtml;
    child = child.firstChild;
    document.getElementById('currentElement').appendChild(child);