Learn HTML – Part 7 – Line Break Tag – br Tag Explained
The HTML br tag is used to create a line break inside text. It forces the content to continue on the next line without starting a new paragraph.
The br tag is commonly used when writing poems, addresses, or any content where line breaks are required.
What is the br Tag?
The br tag stands for Line Break. It inserts a single line break in the text.
Unlike most HTML elements, the br tag is a self-closing tag and does not require a closing tag.
Basic Syntax
<p>
Hello World!<br>
Welcome to HTML.
</p>
Example – Using a Line Break
<p>
HTML is the foundation of web development.<br>
It is used to structure web pages.
</p>
Output:
HTML is the foundation of web development.
It is used to structure web pages.
Common Use Cases
- Writing poems
- Displaying addresses
- Formatting short text lines
Example – Address Format
<p>
WPDeveloperTips<br>
Calicut, Kerala<br>
India
</p>
Output:
WPDeveloperTips
Calicut, Kerala
India
br vs p – Key Difference
| Feature | br Tag | p Tag |
|---|---|---|
| Purpose | Creates a line break | Creates a new paragraph |
| Spacing | No extra spacing | Adds space before and after |
| Usage | Short line breaks | Full content blocks |
Common Mistakes Beginners Make
- Using too many
brtags for spacing - Using
brinstead of proper paragraphs - Trying to close the tag like
</br>
Use the
brtag only when a line break is necessary, not for layout spacing.
Conclusion
The HTML br tag is used to insert line breaks within text.
It is useful for formatting short lines such as poems, addresses, or structured text.
What’s Next?
Now that you understand the br tag, the next step is learning about the p tag, which is used to create paragraphs in HTML.
Next: Learn HTML – Part 8 – Paragraph Tag – p Tag Explained →
Series: Learn HTML Series
