Difference between display none and display block

iJade picture iJade · Dec 26, 2012 · Viewed 66.4k times · Source

What is the difference between setting a control's style display: none and display: block?

Answer

Adil picture Adil · Dec 26, 2012

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)