1// javascript
2<script>
3 document.getElementById("id").style.display = "none"; //hide
4 document.getElementById("id").style.display = "block"; //show
5 document.getElementById("id").style.display = ""; //show
6</script>
7
8// html
9<html>
10 <div id="id" style="display:none">
11 <div id="id" style="display:block">
12</html>
13
14// jquery
15<script>
16 $("#id").hide();
17 $("#id").show();
18</script>
19
1//If you have jquery, you can use the following method:
2$("#mydiv").hide(); //hides div.
3$("#mydiv").show(); //shows div.
4//If you don't have jquery...
5//search up the following: html how to add jquery
1<div id="main">
2 <p> Hide/show this div </p>
3</div>
4
5('#main').hide(); //to hide
6
7// 2nd way, by injecting css using jquery
8$("#main").css("display", "none");
1<div style='visibility:hidden; overflow:hidden; height:0; width:0;'>
2 [content]
3</div>