remove a div by it attribute javascript code example Example: remove attribute javascript document.getElementsByTagName("H1")[0].removeAttribute("class");