DEV Community

Dezina
Dezina

Posted on

Difference between display:none and visiblity: hidden

visibility:hidden hides the element, but it still takes up space in the layout.

display:none removes the element from the document. It does not take up any space.

https://www.w3schools.com/css/tryit.asp?filename=trycss_display

Top comments (0)