Line Breaks with <br>
A free lesson from Swipe Coding · HTML, level 2 · updated October 2026
By the Swipe team, founded by Colin · how we make lessons
The <br> element forces a line break right where it appears, without starting a new paragraph. Like <img>, it is a void element — it never wraps content, so it has no closing tag.
<p>123 Baker Street<br>London<br>United Kingdom</p>
<br> is meant for content where the line breaks are part of the actual meaning — a mailing address, the lines of a poem, lyrics. It is not meant for adding visual space between unrelated pieces of text; stacking several <br> tags to create a gap is a sign that what you actually want is a new <p>, or a bit of CSS margin.
Because it has no closing tag, whitespace and indentation around <br> don't matter to the browser — only its presence in the markup does. Writing <br> or <br /> both work the same way in HTML5; the trailing slash is just an older, XHTML-style habit some developers still keep.
What does <br> do?
<br> is a void element, meaning it never needs a closing tag.
Stacking multiple <br> tags to create visual space between paragraphs is usually a sign you should use a new ____ instead.
Keep your streak going in Swipe Coding
Swipe through every level of HTML on your iPhone — with XP, stars, streaks, a personal advisor and the full track beyond these free levels.
Get the Swipe apps →