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
Specify the element is visible or hidden

CSS display:inline style

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


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

Run it...   »