<html>
<body>
<p id="myP" style="visibility:hidden;">This is a p element.</p>
<button type="button" onclick="myFunction()">Return the visibility type of p</button>
<script>
function myFunction() {
alert(document.getElementById("myP").style.visibility);
}
</script>
</body>
</html>