HTML Block and Inline
Understand why some elements start on new line and others stay in the same line.
David Miller
January 12, 2026
0.7k20
Some elements take full line (block). Some stay in same line (inline).
Block examples
- div, p, h1, section
Inline examples
- span, a, b, i
Example
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<span>First</span>
<span>Second</span>
Preview
This is a paragraph.
This is another paragraph.
First Second
Simple rule
Block = new line
Inline = same line
#HTML#Beginner