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 an HTML Element.

This is a paragraph.

This is another paragraph.

// activate the function by clicking the button
 onclick="myFunction()"

// when the button is clicked
function myFunction() {
document.getElementById("p1").remove();
}