toggle between hiding and showing an element using html and javascript - w3schools code example Example: how to hide div in html document.getElementById('elementName').hide();