CSS Display Property
The CSS display property controls how an HTML element
is displayed on a webpage.
1. Display Block
Block Element 1
Block Element 2
2. Display Inline
Inline Element 1
Inline Element 2
Inline Element 3
3. Display Inline-Block
Box 1
Box 2
Box 3
4. Display None
The following text is hidden because
display: none is used.
You cannot see this text on the webpage.
Summary
- block: Starts on a new line.
- inline: Stays in the same line.
- inline-block: Same line with width and height.
- none: Completely hides the element.