Skip to main content
D
CSS
CSS Display

CSS Display

CSS display changes how elements flow in the document layout.

Read Time
5 min read
Difficulty
Beginner
Last Updated
Jun 15, 2026
Version
v1.0.0

Introduction

The CSS `display` property dictates whether an element acts as a block, inline text, or a flex container. Every HTML element has a default display value. Developers change this property to build complex page structures.

Example

Example
1/* this changes display behavior */
2li {
3  display: inline;
4}
5
6span {
7  display: block;
8}

Key Points

  • Block elements take up the full width of the page.
  • Inline elements only take up as much space as their content.
  • The `none` value hides the element completely from the page.
  • Flex and grid values enable advanced layout systems.

Up Next

Continue your journey with the next topic.

Go to CSS Position