Saturday, September 7, 2019

Can you explain "visibility:hidden" and "display:none"?

Display:none - means that the tag in question will not appear on the page at all (although you can still interact with it through the dom). There will be no space allocated for it between the other tags.

visibility:hidden means that unlike display:none, the tag is not visible, but space is allocated for it on the page. The tag is rendered, it just isn't seen on the page.



For example:
test | <span style="[style-tag-value]">Appropriate style in this tag</span> | test
Replacing [style-tag-value] with display:none results in:
test |   | test
Replacing [style-tag-value] with visibility:hidden results in:
test |                        | test



Back to Questions: Can you explain "visibility:hidden" and "display:none"? - "Can you explain "visibility:hidden" and "display:none"?"

1 comment:

  1. Nicely explained the topic "SEO Services" same as you mention about is quite popular these days in the united kingdom, United States, Ireland, And other countries. our company provides same services without any risk, kindly visit to know Website Development Company in UK

    ReplyDelete