📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials HTML Fundamentals Block vs Inline

Block vs Inline

4 min read
Block elements start on a new line and take full width: div, p, h1. Inline elements flow with text without line breaks: span, a, strong. The CSS display property can change any element's layout behaviour.

Block vs Inline Elements

Block elements start on a new line and take full width:

div, p, h1-h6, ul, ol, li, table, header, section, article, footer, form, blockquote, hr

Inline elements stay in the text flow:

a, span, img, strong, em, code, input, button, label, small, sup, sub