What does the <br> tag do?

LowEasyHtml
Quick Answer

The <br> tag inserts a semantic line break inside the same text block. The real pitfall is using it as a layout spacer instead of CSS, which hurts readability, accessibility, and maintainability.

Answer

Definition and Purpose

The
tag inserts a line break inside the current text block. In production, the important when not rule is this:
is for semantic line breaks like addresses, lyrics, or short contact info, not for page layout spacing. Using it as a spacing hack creates readability, accessibility, and maintenance problems.

Syntax

The tag can be written as:

`html
Line one.

Line two after the break.
`

It can also be written with a self-closing slash (<br />) in XHTML-style HTML, but both are interpreted the same in modern browsers.

Use Cases

The
tag is often used in scenarios where text needs manual line breaks — such as poetry, song lyrics, addresses, or formatted contact information. It should be avoided for layout spacing, as CSS provides more flexible and accessible methods for controlling vertical spacing.

Feature

Description

Tag Type

Empty tag (no closing tag required)

Display Behavior

Breaks text to the next line within the same block element

Common Uses

Poems, addresses, short quotes, or text requiring specific line breaks

Best Practice

Avoid using
for spacing — use CSS margin or padding instead

Overview of `<br>` tag properties and usage.

Example

`html
<p>
Roses are red,

Violets are blue,

HTML is great,<br>
And so are you.
</p>
`

Here, each
tag forces the next line of the poem to start directly beneath the previous one without extra paragraph spacing.

Practical scenario
Render a multi-line address in a footer without adding extra block elements.

Common pitfalls

  • Using
    for layout spacing instead of CSS.
  • Stacking many breaks which hurts readability.
  • Forgetting that screen readers announce line breaks differently.
Trade-off or test tip
Use
for semantic line breaks only. Test with a screen reader and responsive layouts.

Still so complicated?

Think of
as pressing the Enter key once when typing text — it moves to the next line but stays within the same paragraph or container. In contrast, using <p> is like starting a new paragraph entirely with spacing before and after it.

Summary

The
tag is used to insert a single line break in text. It is a simple and inline element that helps control text flow where natural line breaks are required. For structure or spacing, always prefer semantic HTML and CSS rather than relying on multiple
tags.

Similar questions
Guides
Preparing for interviews?

Use the relevant interview-question hub first, then move into a concrete study plan before targeted company sets.