JSFiddle - React, Tailwind, and code Playground

by domenlightenment

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
<div id="A"></div>
<div id="B"></div>
<div id="C"></div>

CSS

strong{
    font-weight:bold;
}

JavaScript

//create a strong element and text node and add it to the DOM
document.getElementById('A').innerHTML = '<strong>Hi</strong>'; 

//create a text node and update the div#ex5 with the text node
document.getElementById('B').textContent = 'Dude';

//create a div element and text node to replace <span id="C"></div>
document.getElementById('C').outerHTML = '<div id="C">Whats Shaking</div>'

console.log(document.body.innerHTML);
/*logs
<div id="A">Hi</div>
<div id="B">dude</div>
<div id="C">Whats Shaking</div>*/