removeChild
(node) method
JSwindow.onload = function() {
var parent = document.getElementById("demo");
parent.removeChild(document.getElementById("p1"));
};
HTML<div id="demo">
<p id="p1">This is a paragraph.</p>
<p id="p2">This is another paragraph.</p>
</div>