elem.style.display = 'none' code example Example: display none js document.getElementById("myDIV").style.display = "none";