Visibility Property in CSS
The visibility Property
The visibility property specifies whether an element is visible or hidden. Its most common values are visible and hidden. visibility:hidden hides an element, but it will still take up the same space as before. The element will be hidden, but it will still affect the layout.
Syntax:-
Its syntax is:-
< style >
element {
visibility: visible| hidden| collapse| initial| inherit;
}
< /style >
Further Explanation:-
Value | Description |
---|---|
visible | The element is visible |
hidden | The element is hidden. |
collapse | This value removes a row or column, but it does not affect the table layout. The space taken up by the row or column will be available for other content. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |