CSS Display Property
Understand display types: block, inline, inline-block, none, and how layout changes visually.
David Miller
January 6, 2026
1.3k41
Display controls how elements behave.
Block
- takes full width
- starts new line
div {
display: block;
}
Inline
- stays in line
- no width/height
span {
display: inline;
}
Inline-block
Best of both.
.box {
display: inline-block;
width: 100px;
}
None
.hidden {
display: none;
}
Remember
- block for layout
- inline for text
- inline-block for small UI pieces
#CSS#Beginner