Example
A simple visibility property example:
Laboratory
description & Usage
We use the visibility property to display an element. (In some cases, we don't want an element to be displayed, so if it is definitely needed to be displayed, the visibility property is used).
Browser compatibility and Support
# |
Chrome |
Edge |
Firefox |
Safari |
Opera |
visibility |
|
|
|
|
|
Values
Values |
Description |
visible
|
Default
|
hidden
|
Hides the element.
|
collapse
|
This amount is for:
table rows (<tr>)
row groups (<tbody>)
columns (<col>)
Column groups (<colgroup>)
Deletes a row or column without disturbing the appearance of the table.
|
initial
|
Adds this value to its default property.
|
inherit
|
It inherits this value from its parent tag.
|