JSFiddle - React, Tailwind, and code Playground
by steveukx
HTML
<div id="blah">
<section>
<p>hello</p>
</section>
</div>
<div id="foo"></div>
<script src="https://raw.github.com/aFarkas/html5shiv/master/dist/html5shiv.js"></script>
CSS
div { font: 10pt/1.5 sans-serif; }
section { background: red; padding: 0 4pt; }
JavaScript
document.body.appendChild(document.createElement('pre'))
.innerHTML = document.getElementById("blah").outerHTML.replace(/</g, '<');
setTimeout(function () {
document.getElementById("foo").innerHTML = "<section><p> created with innerHTML </p></section>"; })