<br> & <wbr> Tags in HTML

Quick facts

CategoryFlow content, phrasing content
Content modelEmpty — both are void elements
Tag omissionVoid elements — no end tag, ever
Permitted parentsAny element that accepts phrasing content
DOM interfaceHTMLBRElement (<br>), HTMLElement (<wbr>)

Syntax

Line one<br> Line two https://example.com/very<wbr>/long<wbr>/path

Live example

Edit the code below and watch the preview update instantly.

index.html
Preview

Attributes

AttributeDescription
—Only the global attributes apply. The old clear attribute on <br> is obsolete; use the CSS clear property instead.

Common examples

Lines of a postal address

Inside an <address>, each line of the address really is a separate line, so <br> is the right tool.

<address> Example Bakery<br> 12 Main Street<br> Springfield, IL 62701 </address>

Poems and song lyrics

The line breaks are part of the writing, so each line ends with a <br> while each verse is its own paragraph.

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

Text that already contains line breaks

For text from a database or a textarea, you don’t need to insert <br> tags: the CSS white-space property can show the existing line breaks.

<p class="message">Thanks for the order! It ships tomorrow.</p> <style> .message { white-space: pre-line; } </style>

<br> vs CSS spacing

A <br> belongs in your HTML only when the line break is part of the content: an address, a poem, lines of a signature. Everything else about spacing — gaps between paragraphs, extra room above a heading, space around a button — is design, and design belongs in CSS.

Using CSS (margin, padding, gap, white-space) keeps the spacing consistent across the site and easy to change in one place, and it adapts to phones, where hard-coded line breaks often land in odd places.

<br>CSS spacing
Use forMeaningful line breaksLayout and gaps
Adapts to screen sizeNoYes
ExampleAddress linesp { margin-bottom: 1em; }

Common mistakes to avoid

  • Stacking <br> tags for spacing. Several breaks in a row create gaps that change with font size and can’t be adjusted site-wide.
  • Breaking lines to “make text fit”. A line break that looks right on your screen lands mid-sentence on a phone. Let text wrap naturally.
  • Using <br> between list items or form fields. Use a real list for items, and block elements or CSS for form layout.
  • Writing </br>. There is no closing tag; write <br> (or <br />).

Accessibility & SEO tips

  • Most screen readers don’t announce a <br>; they simply pause. That’s fine for addresses, but it means breaks shouldn’t carry meaning that would otherwise be lost.
  • Text full of manual breaks reflows badly when visitors zoom in or use large fonts, which can make it hard to read for people with low vision.
  • Search engines treat a <br> like a space, so it has no SEO effect either way.

Browser support

Supported in every browser, including Chrome, Edge, Firefox, Safari and their mobile versions — it has been part of HTML since the very first versions. The <wbr> element works in all current browsers too.

Related tags

Frequently asked questions

Should I write <br> or <br />?
Both are valid in HTML. <br> is the standard HTML form; <br /> is a leftover from XHTML and is also accepted. Pick one style and use it consistently.
Can I use several <br> tags to add space between paragraphs?
No. Stacking <br> tags for spacing makes pages harder to read for screen reader users and harder to restyle. Use separate <p> elements and control the gap with CSS margin.
What is the difference between <wbr> and &shy;?
Both mark an optional break point. <wbr> breaks the word without adding anything, which suits URLs. The &shy; soft hyphen entity shows a hyphen at the end of the line when the word breaks.
Is </br> valid HTML?
No. <br> is a void element with no closing tag. Browsers treat </br> as a line break anyway to be forgiving, but write <br> (or <br />) to keep your HTML valid.
How do I show line breaks from text that contains newlines?
Add white-space: pre-line in CSS to the element holding the text. The existing newlines then display as line breaks, with no need to insert <br> tags.
Does <br> affect SEO?
No. Search engines read a line break like a space between words. Use headings and paragraphs to give your content structure instead.