The BR tag creates a single line break in your HTML

The <br> tag tells a browser to move the next line of text down one line, without starting a new paragraph. It is one of the simplest HTML tags to use: you type <br> where you want the break to happen, and the browser does the rest. Unlike paragraph tags or division tags, the BR tag does not add extra space above or below the break — it just moves the text down.

The BR tag is self-closing, which means it does not need a closing tag like </br>. In modern HTML (HTML5), you write it as <br>. In older HTML versions, you might see <br /> with a space and forward slash, but both work in current browsers.

Key Takeaways

  • The BR tag is written as <br> and creates a single line break without adding paragraph spacing.
  • Place the BR tag directly in your HTML where you want the line to break, such as in the middle of a paragraph or between lines of poetry.
  • The BR tag is self-closing and does not need a closing tag or any content inside it.
  • Use BR tags for line breaks within content, but use paragraph tags (<p>) when you need actual paragraphs with spacing.
  • Overusing BR tags to create spacing is a common mistake — CSS margins and padding are better for layout control.

Where to place the BR tag in your code

Put the BR tag directly in your HTML at the point where you want the line to break. If you are writing a paragraph and want a line break in the middle, type the text, then <br>, then continue with the next line of text. The browser will display everything as one paragraph, but the text after the BR tag will appear on the next line.

For example, if you are displaying an address or a poem where line breaks matter, you would write:

<p>123 Main Street<br>Springfield, IL 62701<br>United States</p>

The browser will show the address on three separate lines, but it is still all inside one paragraph tag. This is cleaner than creating three separate paragraphs, which would add unwanted space between each line.

BR tag versus paragraph tags and spacing

The BR tag and the paragraph tag (<p>) do different jobs. A paragraph tag wraps a block of text and adds space above and below it. A BR tag just moves the text down without adding that extra space. If you want separate blocks of text with breathing room between them, use <p> tags. If you want lines to sit close together, use <br>.

A common mistake is using multiple BR tags to create space on a page, like <br><br><br>. This works but is hard to control and makes your code messy. If you need space between sections, use CSS margins or padding instead. That way, you can change the spacing in one place without editing your HTML.

Using BR tags in forms and user input

When a user types text into a form field and presses Enter, the browser does not automatically turn that into a BR tag. If you want to preserve line breaks from user input, you need to convert those line breaks to BR tags using code on your server or in JavaScript.

For example, if someone fills out a comment form and types multiple lines, you would need to replace the line break characters (called newline characters) with <br> tags before displaying the comment. Most web frameworks have built-in functions for this, such as nl2br() in PHP or similar methods in other languages.

BR tags and accessibility

Screen readers and other assistive tools treat BR tags as simple line breaks, not as meaningful structure. This is fine for decorative line breaks or addresses, but if you are using BR tags to create visual structure that matters to understanding the page, consider using proper HTML elements instead.

For example, if you are marking up poetry or song lyrics where the line breaks are part of the meaning, BR tags work well. But if you are using BR tags to separate sections of content, use heading tags (<h2>, <h3>) or paragraph tags so that the structure is clear to everyone.

Common mistakes with the BR tag

The most common error is writing <br></br> with a closing tag. The BR tag does not have a closing tag — it is self-closing. Some older code uses <br />, which is also correct, but modern HTML prefers <br> without the space and slash.

Another mistake is using BR tags for layout. If you want to center content, create columns, or add margins around a section, use CSS instead. BR tags are for line breaks within text, not for positioning elements on the page. Using them for layout makes your code hard to maintain and often breaks on different screen sizes.

Frequently Asked Questions

Do I need to close the BR tag?

No. The BR tag is self-closing, so you write it as <br> and nothing else. You do not write <br></br>. In older HTML versions, <br /> was common, but modern HTML5 uses <br>.

Can I use BR tags to add space between paragraphs?

You can, but you should not. Multiple BR tags are hard to control and make your code messy. Use CSS margins or padding on your paragraph tags instead. That way, you can adjust spacing in one place without changing your HTML.

What is the difference between BR and P tags?

The P tag creates a paragraph with space above and below it. The BR tag just moves text to the next line without adding space. Use P tags for separate blocks of text and BR tags for line breaks within a block.

Will BR tags work the same way in all browsers?

Yes. The BR tag is one of the oldest and most widely supported HTML elements. Every browser displays it the same way — as a single line break with no extra space.