Search within TutorialsPark

CSS visibility Property


To set the visibility of an element


Definition and Notes.

1. The CSS visibility property is used to control the visibility of your element


Syntax:

CSS visibility property. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note-Use the display property to make the element not occupy any space at all.

Property Values

Value Description
visible The element is visble. Its the default value
hidden The element is hidden(i.e invisible). But it still occupies its space in the layout
collapse The element is hidden and does not occupt the space in the page layout
inherit To value for visibility is inherited from the parent element

Specifications

Specs Value
Name display
Value visible | hidden | collapse | inherit
Initial Value Inherit
Applies to All elements
Javascript syntax object.style.visibility="hidden"
Inherited Yes
Computed Value Same as declared value
Browser Support internetexplorer safari firefox opera chrome


Related Examples.