visibility

The visibility CSS property specifies whether the boxes generated by an element are rendered.

Syntax

CSS

visibility: value;

JS

object.style.visibility = "value";

Values

<'visibility'> = visible | hidden | collapse | inherit
visible

The generated box is visible.

hidden

The generated box is invisible, but still affects layout. Descendants of the element will be visible if they have 'visibility: visible'.

collapse

The generated box is invisible and does not affect layout when used on rows, row groups, columns, or column groups. When not, 'collapse' has the same meaning as 'hidden'.

inherit

Specifies the same value as the parent.

Initial

visible

Examples

collapse

hidden

visible

JS

Internal

content-visibility

display

External

World Wide Web Consortium (W3C)

Home Menu