What does the <br> tag do?

LowEasyHtml
Preparing for interviews?

Use guided tracks for structured prep, then practice company-specific question sets when you want targeted interview coverage.

Quick Answer

The <br> tag inserts a line break inside text content. It’s an empty element and should be used for line breaks in prose, not for layout (use CSS for spacing). Use it only for semantic line breaks (addresses, poems), not layout. Overuse can hurt accessibility and maintainability; test with screen readers.

Answer

Definition and Purpose

The
tag stands for 'break' and is an empty (self-closing) HTML element used to force a line break in text. It tells the browser to move the content that follows onto the next line. Unlike <p> or <div>, it does not create extra vertical spacing or start a new block — it simply breaks the line within the same block context.

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
9 / 27