All major browsers support the visibility property.
Note: The "Inherit" and "collapse" property values are not supported by any version of Internet Explorer (including IE8).
The Visibility property specifies whether the element is visible. Even invisible elements occupy space on the page.
The display property to create an invisible element that does not occupy the page space. Even invisible elements do not occupy space on the page.
This property specifies whether to display an element that is generated by the elements box. This means that the element still occupies its original space, but it can be completely invisible. The value collapse is used in the table to remove columns or rows from the table layout.
| Default value: |
Visible |
| Inheritance: |
Yes |
| Version: |
CSS2 |
| JavaScript Syntax: |
object. style.visibility= "Hidden" |
VisibilityThe desirable value
| value |
Description |
| Visible |
The default value. The element is visible. |
| Hidden |
The element is not visible. |
| Collapse |
When used in a TABLE element, this value can delete one row or column, but it does not affect the layout of the table. The space occupied by rows or columns is left for other content to use. If this value is used on other elements, it is rendered as "hidden". |
| Inherit |
Specifies that the value of the visibility property should be inherited from the parent element. |
CSS Visibility and Display properties