We use
removeChild() to remove element
<div id="div1">
<p id="p1">TechFunda.</p>
<p id="p2">DotNetFunda</p>
</div>
<script>
var a = document.getElementById("div1");
var b = document.getElementById("p1");
a.removeChild(b);
</script>
It removes the id value which we have given "p1".