To hide an element, use:
display: none;
visibility: hidden;
To show an element, use:
display: block;
visibility: visible;
The difference is:
Visibility handles the visibility of the tag, the display
handles space it occupies on the page.
If you set the visibility
and do not change the display
, even if the tags are not seen, it still occupies space.