CSS visibility Property

CSS visibility property set an elements to display visible or hidden form.

CSS visibility value set hidden, it means element just hidden mode but it's take same space at the mode of visible.

CSS visibility Property

Syntax Value Description
visibility visible
hidden
Specify the element is visible or hidden

CSS display:inline style

CSS display inline means elements displayed inline in current block of line.

Example

<!DOCTYPE html>
<html>
<head>
  <title>CSS visibility property</title>
  <style type="text/css">
    li.first {
      visibility: visible;
    }
    li.second {
      visibility: hidden;
    }
  </style>
</head>
<body>
  <p>First block paragraph</p>
  <ul>
    <li class="first">This is block menu.1</li>
    <li class="second">This is block menu.2</li>
  </ul>
  <p>Another block paragraph</p>
  <ul>
    <li>This is block menu.1</li>
    <li>This is block menu.2</li>
  </ul>
</body>
</html>

Run it...   »