visibility

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

CSS2

Syntax

visibility: visible | hidden | collapse | inherit
Initial: visible
Applies To: all elements
Inherited: yes
Percentages: NA
Media: visual

Values

visibility: value
Value Description
collapse Removed from display for rows, row groups, columns, or column groups and hidden from display for other elements
hidden Hidden from display but affects layout
visible Visible for display

DOM

[window.]document.getElementById("element-id").style.visibility = "visibility";

Example | collapse

Example | hidden

Example | visible

Example | DOM

External

W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification