Skip to the page
css reference · display & flow

CSS display

type
property
applies to
any element
inherits
no
common values
block, inline, inline-block, flex, grid, none

Where it goes

On a tag whose built-in behavior is not what you need.

Example

span.badge {
  display: inline-block;
  padding: 2px 8px;
}

Common mistakes

  • Setting width or height on an inline tag like <span> without changing its display first. Inline tags ignore those properties.
  • Using display: none to hide something that a screen reader (software that reads the page aloud) should still find. none removes it from everyone.

Related

Updated 24 October 2026. Practice it in the css route, or read more on MDN.