Web4College

CSS visibility property

src

Description

CSS visibility property represents visibility of the an element. It is the same as display:none; except it occupies the space in all cases i.e. whether visible or hidden.

Syntax

visibility : visible | hidden | collapse

Property values

visibleDefault

The box (element) is visible.

visibility: visible;
Try it

hidden

It is invisible but still occupies the space and affects the layout. It may be called as fully transparent box.

visibility: hidden;
Try it

collapse

It is the same as 'hidden' except for row, row groups, column, column groups.

visibility: collapse;
Try it

Applicable to

It applies to all elements