html hide till button click
snippet in html

html hide till button click

user4560


function myFunction() {
  var x = document.getElementById("myDIV");

    if (x.style.display 
=== "none") {
    x.style.display = "block";
  } else {
    x.style.display = 
  "none";
  }
} 

html hide till button click

user4849


<button onclick="myFunction()">Click Me</button>

<div id="myDIV">
  
This is my DIV element.
</div>