how to set display attribute in DOM code example Example: display none js document.getElementById("myDIV").style.display = "none";