What is the difference between inline and block elements in HTML?

A block element starts on a new line and takes the full width. An inline element stays in the same line and takes only as much width as its content.

PointBlockInline
New lineYesNo
WidthFull widthOnly the content
Examplesdiv, p, h1, ul, tablespan, a, strong, img
<p>Block one</p>
<p>Block two</p>
<span>Inline one</span> <span>Inline two</span>
Output in the browser

Block one

Block two

Inline one Inline two

See HTML Block and Inline Elements.


Learn more about the similar topics:
Tutorials
List of common HTML Tags
HTML Elements and Tags
HTML Attributes
HTML Block and Inline Elements
HTML Div and Span
HTML Class and ID
Exercises & Assignments
No Content Found.
Interview Questions & Answers
Do all HTML tags require both a begin and end tag?
What is the difference between HTML tags and elements?
What is an attribute in HTML?
What is the difference between DIV, SPAN and paragraph tag in HTML?
What is the difference between inline and block elements in HTML?
What are void (empty) elements in HTML?
What is the difference between id and class in HTML?