w3schools css hide div when click button code example Example: how to hide div in html document.getElementById('elementName').hide();