property-value
display/none — CSS reference
Suppresses box generation for the element and its subtree. It has no reserved layout space; a descendant cannot restore its box with display:block. This generally also removes the subtree from the accessibility tree, though hidden labeling references can still contribute to accessible names.
Formal Syntax & Structure
css syntaxcss
display: none;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{display:none}#a span{display:block}</style><body><div id="p"><div id="a"><span id="c">Hidden</span></div><div id="b">Shown</div></div></body></html>