The CSS21 specification defines two properties that affect HTML element visibility: display and visibility.
You can make an element non-visible by using either display:none
or visibility: hidden
.
display: none removes the element from its normal position in the document flow, which causes the browser to recalculate document layout, and repaint.
visibility: hidden makes the element invisible, but does not remove it from the document flow. Layout is not affected.
Element is not visible, and is removed from layout.