← Back to properties
CSS Property
display
LayoutSets how an element participates in layout, including block, inline, flex, grid, or none.
Syntax
display: value;
Example
display: flex;
Common use cases
- Switching between block and inline elements
- Creating flex or grid containers
- Hiding elements with display: none
Practical developer insight
display: none removes the element from the flow entirely — use visibility: hidden if you need to keep the space.