property

visibility — CSS reference

Controls visibility without generally removing ordinary boxes from layout. Initial visible; inherited. A descendant may override inherited hidden with visible. Collapse has layout-specific effects for tables and some other contexts. Hidden ordinary elements are generally not focusable or exposed to assistive technology.

Formal Syntax & Structure

css syntaxcss
visible | hidden | collapse

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS flow layout lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}body{font:16px/20px sans-serif} #p{width:240px;background:#e6eef2} .tile{background:#c2e4d5} #a,#b{box-sizing:content-box}#a{visibility:hidden;height:40px}#c{visibility:visible}</style><body><div id="p"><div id="a"><span id="c">Visible child</span></div><div id="b">Next</div></div></body></html>
CSS Reference