CSS/HTML Visible Heading Code For Website - Learn About Website | DaddyFile

0

visibility:hidden; also hides an element.
However, the element will still take up the same space as before. The element will be hidden, but still affect the layout.

Html Code:

<!DOCTYPE html>
<html>
<head>
<style>
h1.hidden {
    visibility: hidden;
}
</style>
</head>
<body>

<h1>This is a visible heading</h1>
<h1 class="hidden">This is a hidden heading</h1>
<p>Notice that the hidden heading still takes up space.</p>

</body>
</html>








Html Code Result:

This is a visible heading


Notice that the hidden heading still takes up space.



Post a Comment

 
Top