JSFiddle - React, Tailwind, and code Playground
HTML
<div id="div">
<p id="p1">This is a paragraph.</p>
<p id="p2">This is another paragraph.</p>
</div>
JavaScript
var parent=document.getElementById("div");
var child=document.getElementById("p1");
parent.removeChild(child);