CSS
Block, Inline, and Inline-Block
Laying Out ElementsEvery element in HTML has a display type, which decides how it behaves on the page. The three most common types are block, inline, and inline-block.
Block Elements
A block element takes up the entire width of the page by default, even if the content inside is small. It always starts on a new line.
Common block elements include: <div>, <p>, <h1> to <h6>, <section>, and <article>.
Members only
Keep reading this lesson
You've reached the end of the free preview. Unlock the rest of this lesson plus 12 more lessons in CSS.
- Unlimited coding questions
- Unlimited access to all classroom material
- Weekly live call for questions and guidance
- 3,000 AI tutor tokens / month
- Personal SQL database (3 MB)
- Progress tracking
Cancel any time.