Paragraphs and Line Breaks
The <p> element wraps one or more related sentences into a paragraph — it adds semantic structure and default vertical spacing. The <br> element forces a line break inside a paragraph without starting a new one.
Two Paragraphs
This is the first paragraph. Browsers collapse the multiple spaces in the HTML source into single spaces,
and ignore the line break in the markup — only the <p> end tag starts a new block.
This is a separate paragraph. The browser adds default vertical margin between the two, visually signaling that they are distinct blocks of content.
One Paragraph with <br>
This is still one paragraph, but I've inserted a line break.
The content after <br> continues on a new line,
while still belonging to the same <p> element.
When to Use <br>
Steve Jobs
Co-founder, Apple Inc.
Cupertino, California
(poetic: lines of a poem or song lyrics)
Rule of thumb
- Need a new paragraph? Use
<p> - Need a forced break within a paragraph (addresses, poetry)? Use
<br> - Never use
<br>repeatedly just to add spacing — CSS margin/padding does that
Each <p> starts a new block with default margin. Two consecutive <p> elements are semantically separate. Two lines separated only by <br> are the same paragraph.