Deleting a DOM Element with Javascript

You can use the Node.remove() method to delete a DOM element with Javascript.

for example


Here to delete <h1> tag you will use like this.

let h1 = document.querySelector('h1')

You have now deleted the <h1> tag in the DOM.


There are no comments, make the firs comment