JSFiddle - React, Tailwind, and code Playground
HTML
<p>
<b>Click</b> to change the <span id="tag">html</span>
</p>
<p>
to a <span id="text">text</span> node.
</p>
<p>
This <button name="nada">button</button> does nothing.
</p>
JavaScript
$( "p" ).click(function() {
var htmlString = $( this ).html();
$( this ).text( htmlString );
});