Home » HTML brTag: A Guide with Examples and Best Practices

HTML <br> Tag: A Step-by-Step Guide for Beginners

Introduction

If you’re just starting with web development, you’ll first learn about HTML, the language used to build the structure of web pages. HTML organizes content using elements like headings, paragraphs, and lists.

But what happens when you want to move text to the next line without starting a new paragraph? That’s where the HTML <br> tag comes in.

The <br> tag is used to create a line break in HTML, similar to pressing “Enter” while typing in a text editor. It helps you control how text appears on a webpage without adding extra spacing like paragraphs do.

Learn more about HTML basics:
https://w3htmlschool.com/html/

Explore HTML elements in detail:
https://w3htmlschool.com/html-elements-a-complete-guide/

What is <br> Tag?

What is the <br> tag in HTML?

The <br> tag is an empty HTML element used to insert a line break in text without starting a new paragraph.

When should you use the <br> tag?

Use the <br> tag for line breaks in poems, addresses, or small text formatting, not for layout design.

What is the difference between <br> and <p>?

The <br> tag adds a simple line break, while the <p> tag creates a new paragraph with spacing.

The HTML br tag is one of the simplest elements in HTML. It doesn’t wrap content like other tags. Instead, it simply forces the text to move to the next line.

Unlike most HTML elements, the <br> tag is an empty (void) element, which means it has no closing tag.

Basic Syntax of <br>

<p>Hello&lt;br&gt;World</p>

Output Explanation

This code will display:

Hello
World

Here’s what happens step by step:

  • The browser reads “Hello”
  • When it encounters &lt;br&gt;, it moves to a new line
  • Then it displays “World”

This is a simple br tag example showing how line breaks work in HTML.

Where to Use <br> Tag

Where should you use the <br> tag?
Use the <br> tag to create line breaks in text such as addresses, poems, or short content where spacing is needed without creating a new paragraph.

The <br> tag is useful in specific situations where formatting matters.

Writing Poems

Poetry requires precise line breaks. Using <br> ensures each line appears correctly.

Addresses

Addresses are often written on multiple lines but belong to the same block.

 Small Text Formatting

Used when minor line separation is needed inside a paragraph.

Breaking Lines Inside Paragraphs

Instead of creating a new paragraph, <br> keeps content connected.

Learn more about paragraphs here:
https://w3htmlschool.com/html-paragraph-tag-html-paragraph-element-find-details/

Real-World Examples

Example 1: Address Format

<p>
123 Street Name&lt;br&gt;
City, State&lt;br&gt;
India
</p>

Explanation

Each <br> moves the address to the next line while keeping it inside one paragraph.

Example 2: Poem Format

<p>
Twinkle, twinkle, little star,&lt;br&gt;
How I wonder what you are!&lt;br&gt;
Up above the world so high,&lt;br&gt;
Like a diamond in the sky.
</p>

Explanation

Without <br>, the poem would appear as one line. The tag ensures correct poetic formatting.

<br> vs <p> Tag

Feature <br> <p>
Purpose Line break Paragraph
Spacing No spacing Adds spacing
Use Case Small breaks Content sections

Key Difference Explained

  • <br> → Moves text to the next line
  • <p> → Creates a completely new block of text

Learn more about HTML structure:
https://w3htmlschool.com/html-document-structure-guide-examples-best-practices/

Best Practices

Using the HTML <br> tag properly is important for clean code.

Use Only for Line Breaks

Use it where line separation is required—not for layout.

Avoid Overuse

Too many <br> tags make your code messy and hard to maintain.

Use CSS for Spacing

Instead of multiple <br>, use margins or padding.

Maintain Clean Structure

Combine <br> with proper HTML elements like <p>, <div>, and headings.

Learn more about HTML tags and attributes:
https://w3htmlschool.com/html-tags-and-attributes-complete-guide-with-examples/

Common Mistakes

Beginners often misuse the <br> tag. Here are some common errors:

 Overusing <br>

 
<br><br><br>
 

 This should be replaced with CSS spacing.

Using <br> for Layout

It should not be used to create space between sections.

 Incorrect Placement

Using <br> outside text content doesn’t make sense.


SEO Considerations

The <br> tag does not directly impact search engine rankings, but it plays an indirect role.

 Improves Readability

Proper formatting keeps users engaged.

Enhances User Experience

Clear content structure improves usability.

Supports Content Flow

Helps display structured information like poems and addresses.

Clean HTML improves SEO performance overall.

FAQs: HTML br Tag

What is the <br> tag in HTML?

The <br> tag is used to insert a line break in HTML without starting a new paragraph.

Is the <br> tag self-closing?

Yes, it is an empty element and does not require a closing tag.

Can I use multiple <br> tags?

Yes, but avoid overusing them. Use CSS for spacing instead.

What is the difference between <br> and <p>?

<br> creates a line break, while <p> creates a new paragraph.

Is <br> good for layout design?

No, CSS should be used for layout and spacing.

Scroll to Top