display
The CSS property that sets how an element takes part in layout, such as block, inline, flex, grid or none.
In more detail
Changing it usually triggers layout. Its outer value decides how the box sits among siblings (block starts on a new line, inline flows within text), and its inner value decides how children are laid out (flow, flex or grid).
Related terms
- normal flow — The default way boxes are laid out when no flex or grid is used: blocks stack top to bottom and inline content flows left to right in lines.
- Flexbox — A CSS layout mode that arranges a container's children in a row or column and distributes space between them.
- CSS Grid — A CSS layout mode that places a container's children into rows and columns.
- display: none — The CSS declaration that removes an element and all its descendants from the render tree, so it takes no space and is not drawn.
Taught in
- CSS Parsing, The CSSOM And The Render Tree — Frontend Architecture & Web Platform
- Modern Box Model, Box Sizing, Display Types And Flow Layout — Frontend Architecture & Web Platform
- Deep Flexbox: Flex Grow, Shrink, Basis And Alignment Physics — Frontend Architecture & Web Platform
- Advanced CSS Grid: Named Areas, minmax And auto-fit — Frontend Architecture & Web Platform