display style none and block code example
Example 1: display none js
document.getElementById("myDIV").style.display = "none";
Example 2: how to hide div in html
document.getElementById('elementName').hide();
document.getElementById("myDIV").style.display = "none";
document.getElementById('elementName').hide();