Show or hide an element Show an element: ele.style.display = ''; Hide an element: ele.style.display = 'none'; Source https://htmldom.dev/show-or-hide-an-element/