CSS visibility Property
More "Try it Yourself" examples below.
Definition and Usage
The visibility property specifies whether or not an element is visible.
Tip: Hidden elements still take up space on the page. Use the CSS display property to both hide and remove an element from the document layout!
| Default value: | visible |
|---|---|
| Inherited: | yes |
| Animatable: | yes. Read about animatable |
| Version: | CSS2 |
| JavaScript syntax: | object.style.visibility="hidden" Try it |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
| Property | |||||
|---|---|---|---|---|---|
| visibility | 1.0 | 4.0 | 1.0 | 1.0 | 4.0 |
CSS Syntax
visibility: visible|hidden|collapse|initial|inherit;