toggle element html code example
Example 1: js hide div
//If you have jquery, you can use the following method:
$("#mydiv").hide(); //hides div.
$("#mydiv").show(); //shows div.
//If you don't have jquery...
//search up the following: html how to add jquery
Example 2: how to hide div in html
document.getElementById('elementName').hide();
Example 3: toggle element javascript
document.querySelector("#test").hidden = true;
document.querySelector("#test").hidden = false;