how to remove the html tag in javascript code example Example: delete html with javascript document.querySelector('selector').remove();