How to hide HTML element (tag) with JavaScript and CSS

1 Answer

0 votes
<!DOCTYPE html>
<html>
  
<head>
</head>
  
<body>

<p id="p-id" >text</p>


<input type="button" value="Hide The Text" 
       onclick="document.getElementById('p-id').style.visibility='hidden'">

</body>
</html>

 



answered Jul 31, 2015 by avibootz
...