This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.



Smartphone icons created by Freepik - Flaticon

JS HTML DOM

Remove Child Element

This is a paragraph.

This is another paragraph.

// Find the parent node
const parent = document.getElementById("div1");

// Find and remove the child node
const child = document.getElementById("p1");
parent.removeChild(child);