CSS : Visibility property

The visibility property is used to specify weather an element is visible or not. There are two possible values for visibility property, which are visible and hidden. If the visibility of an element is set to hidden then the element is not visible but it takes up the space on the page. The values or visibility property are as follows :

visible : The element is visible.
hidden : The element is invisible.

Example :
<html>
<head>
  <style>
    .h1 {
      visibility: visible;
    } 
    .h2 {
      visibility: hidden;
    } 
  </style>
</head>
<body>
  <h3 class="h1">This is Visible Text</h3>
  <h3 class="h2">This is Invisible Text</h3>
</body>
</html>
Output :

This is Visible Text
This is Invisible Text


Next Topic :