remove html element with dom code example
Example 1: javascript remove dom element
var elem = document.querySelector('#some-element');
elem.parentNode.removeChild(elem);
Example 2: how to remove an element javascript html
const node = document.getElementById("node");
node.parentNode.removeChild(node);