CSS Visibility
Hide an Element - Use display:none or visibility:hidden?
display:none
visibility:hidden
Reset
Hiding an element can be done by setting the
display property to
none.
The element will be hidden, and the page will be displayed as if the element is not
there:
You can also use visibility:hidden; to hide an element.
However, with this property, the element will be hidden, but it will still take up the same space as if it was visible:
CSS Display/Visibility Properties
| Property | Description |
|---|---|
| display | Specifies how an element should be displayed |
| visibility | Specifies whether or not an element should be visible |