jargon

Frontend & browser·Layout, CSS and the cascade

you hid the element and the gap where it used to be stayed exactly the same size.

visibility: hidden

Also calledinvisible element

Keeping an element in layout but not painting it: it still occupies its space, is not clickable, and is hidden from assistive technology. Because the box still exists it can be transitioned and does not force the surrounding layout to move, which makes it the right tool for placeholders and for hiding something without shifting the page. A descendant can override it back to `visible`, which `display: none` does not allow.

Commonly confused with