The visibility property specifies whether a box generated by an element will be rendered visible on the canvas or not.

Unlike the display property with the value none, the elements made invisible with the visibility property still affect the layout; therefore they exist in the elements flow but are not rendered on the screen.

The visibility property contains following information:

  1. value: visible, hidden, collapse or inherit;
  2. initial: visible;
  3. applies to: all elements;
  4. inherited: yes;
  5. percentages: N/A;
  6. media: visual;
  7. computed value: as specified.

The value hidden hides the box (makes it fully transparent) and the value visible ensures the box is visible. If a descendant box have the value set to visible it will be rendered visible even if its parent (ancestor) is set to hidden.

The value collapse affects the table elements such as rows, row groups, columns and column groups, in any other case it has the same meaning as value the hidden.


CSS element's visibility example:


›› go to examples ››