Path // www.yourhtmlsource.comReference → <br>

<br>


The <br> element produces a line break in text. It is a void element (self-closing) that forces subsequent content to begin on a new line without creating a new paragraph or block.

Clock This page was last updated on 2025-11-27



Syntax

<br>

Or in XHTML style:

<br />

Attributes

  • class - CSS class name (rarely used)
  • id - Unique identifier (rarely used)
  • clear - Deprecated; use CSS clear property instead

Examples

Address formatting:

<p>John Smith<br>
123 Main Street<br>
Dublin, Ireland</p>

Poetry or verse:

<p>Roses are red,<br>
Violets are blue,<br>
HTML is great,<br>
And so are you.</p>

Multiple line breaks (avoid this):

<p>First line.<br><br>Text after extra space.</p>

When to Use

Use <br> only when a line break is semantically meaningful, such as in postal addresses, poetry, song lyrics, or code samples where line breaks are part of the content itself. Do not use <br> to create spacing between paragraphs or to control layout - use CSS margins and padding instead.

Common misuse: Using multiple <br> tags to create vertical spacing. This creates accessibility and maintenance problems. Instead, use proper block elements like <p> with CSS margin styling.

  • <p> - Paragraph (creates block with spacing)
  • <pre> - Preformatted text (preserves line breaks)
  • <div> - Block container