CSS visibility Property Reference
The CSS visibility property is a standard property in CSS Display. Review its formal syntax, computed behavior, and practical declarations.
Updated 2026-08-12
visibility overview
The CSS visibility property is a standard property in CSS Display. Review its formal syntax, computed behavior, and practical declarations.
The computed value normally inherits from the parent element when no declaration wins the cascade.
Syntax and formal definition
| Field | Value |
|---|---|
| Formal syntax | visible | hidden | collapse |
| Initial value | visible |
| Applies to | allElements |
| Inherited | Yes |
| Percentages | no |
| Computed value | asSpecified |
| Animation type | discrete |
| Media | visual |
| Specification group | CSS Display |
| Status | Standard |
Practical examples
These declarations demonstrate valid ways to set visibility. The initial and inherit global keywords remain available even when a property-specific value is preferable.
CSS
.reset-example {
visibility: initial;
}
.inherit-example {
visibility: inherit;
}
@supports (visibility: initial) {
.supported {
visibility: initial;
}
}