Line Breaks and Horizontal Rules
Break a line with br and add a divider with hr.
Syntax
Line one<br>Line two<hr>The <br> element creates a line break without starting a new paragraph. It is an empty element with no closing tag.
The <hr> element draws a horizontal rule — a line that separates content, often marking a change of topic.
Example
Loading editor…
Press Run to see the result.
When to use it
- A developer uses <br> to format a mailing address so each line appears on its own without a new paragraph.
- A poet marks up verse stanzas using <br> between lines inside a single <p> to preserve the poem formatting.
- A form label uses <br> to stack a field name above a helper hint without creating a separate paragraph element.
More examples
Address formatted with br
<br> inserts a line break so each address line appears below the previous one in a single paragraph.
<p>
SoundsCode Inc.<br>
42 Tutorial Lane<br>
San Francisco, CA 94105<br>
USA
</p>Poem verse with line breaks
Using <br> instead of <p> for each line keeps the verse as one logical paragraph with visual line breaks.
<p>
Roses are red,<br>
Violets are blue,<br>
HTML structures the web,<br>
And CSS styles it too.
</p>hr as a thematic section divider
<hr> draws a horizontal rule to visually separate two thematic content sections on the page.
<section>
<h2>Chapter 1: Basics</h2>
<p>We covered HTML fundamentals in this chapter.</p>
</section>
<hr>
<section>
<h2>Chapter 2: Styling</h2>
<p>Next we explore CSS.</p>
</section>
Discussion