JSFiddle - React, Tailwind, and code Playground

by domenlightenment

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
<p>Hi</p>

CSS

p {
    display:inline;
}

JavaScript

//create a strong element node and text node
var elementNode = document.createElement('strong');
var textNode = document.createTextNode(' Dude');

//append these nodes to the DOM
document.querySelector('p').appendChild(elementNode);
document.querySelector('strong').appendChild(textNode);

//log updated html
console.log(document.body.innerHTML);