CSS visibility Property (original) (raw)

Last Updated : 11 Jul, 2025

The visibility property specifies whether or not an element is visible. It can take values such as visible, hidden, or collapse. Unlike display: none, which removes the element from the layout, visibility: hidden hides the element but maintains its space in the layout.

**Syntax

visibility: visible|hidden|collapse|initial|inherit;

**Property values

**Syntax

visibility:hidden;

**Example: In this example, we use CSS to style elements. The .geeks class sets visibility: visible;, making the paragraph visible while

is styled green and text aligned center.

html `

CSS | visibility Property