iJade iJade - 2 months ago 22
CSS Question

Difference between display none and display block

What is the difference between setting a control's style

display: none
and
display: block
?

Answer

The display property defines how a certain HTML element should be displayed. Display block and none are used to show or hide html elements. You can read more about display property and available options here.

  • none: The element will not be displayed at all.

  • block: The element displayed as a block-level element (like paragraphs and headers)