visibility CSS property specifies whether an element is visible on the screen or not. That is, whether the boxes generated by an element are rendered or not.
The following table summarizes the usages context and the version history of this property.
|Applies to:||All elements|
|Animatable:||Yes. See animatable properties.|
|Version:||CSS 2, 3|
The syntax of the property is given with:
The example below shows the
visibility property in action.
ExampleTry this code »
The following table describes the values of this property.
||The box and its contents are visible. This is default.|
||The box and its content are invisible, but still affect the layout of the page.|
Only for certain internal table objects: rows, row groups, columns and column groups. It removes the objects, but it does not affect the table layout in any other way. The space occupied by the table object will be filled by subsequent siblings.
If collapse is specified for other element, it causes the same behavior as hidden.
||Sets this property to its default value.|
||If specified, the associated element takes the computed value of its parent element
visibility property is supported in all major modern browsers.