Menu
Text & Formatting
<br> & <hr>
Line breaks and thematic horizontal rules.
1Breaks and Rules
<br> forces a line break inside text (use only when the break has meaning, e.g. addresses or poetry). <hr> renders a thematic break — use it to separate sections.
Example Code
css
<p>123 Main St.<br />Springfield, USA</p>
<section>...</section>
<hr />
<section>New section</section>2Put the element in context
A line break can serve content with intentional lines, such as an address or poem. A thematic break separates subjects. Neither should replace the margins, padding, or gap used to lay out ordinary interface regions.
3Practice with a small page
Mark up an address with intentional line breaks and an article with a thematic change. Style the article spacing separately. Remove unnecessary breaks from a normal paragraph and compare how it wraps at several widths.
Finished reading?
Mark this topic as complete to track progress.