On this page
  1. display
  2. Syntax & Overview
  3. Notes & Best Practices
  4. Example

display

Prev: layout | Up: layout | Next: `flex`
Rel: layout, Display & Layout Guide
Ref: MDN Web Docs — display
Tags: #public #web #css #properties #layout #tier/core


Syntax & Overview

display: block | inline | flex | grid | flow-root | none;

Controls an element's outer flow participation and inner formatting context.

Notes & Best Practices

Example

.stack { display: flex; flex-direction: column; gap: 1rem; }
.grid  { display: grid; grid-template-columns: 16rem 1fr; }

Linked from

Related notes