CSS Display Property

Understanding the display Property

The display property determines how an element is rendered in the document flow. It can turn an element into a block, inline, flex container, grid container, or hide it completely.

Common Values

Interactive Demo

Box 1
Box 2
Box 3

Code Example

.example {
  display: flex; /* change to block, inline, grid, etc. */
}

Experiment with the dropdown above to see how each display value affects the layout.