HTML <br> Line Break Tag
Tags: learnhtml
Published: 2021-02-13 11:41:18

---
title: HTML <br> Line Break Tag
published: true
date: 2021-02-13 10:08:16 UTC
tags: LearnHTML
canonical_url: https://sharepointanchor.com/learn-html/html-br-line-break-tag/
---

In [HTML](https://sharepointanchor.com/category/learn-html/ "HTML"), the **br tag** defines a **Line break**. This tag creates a line break in an [HTML](https://sharepointanchor.com/category/learn-html/ "HTML") document. If you place the **br tag** in the [HTML](https://sharepointanchor.com/category/learn-html/ "HTML") document it works the same as pressing the **“Enter”** key. It is useful for **writing a poem or an address**.

<svg aria-hidden="true" focusable="false" data-icon="clock" width="20" height="20" fill="none" stroke="currentColor" style="display:inline-block;vertical-align:-0.1em" role="img" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>Estimated reading time: 3 minutes

## Syntax:

The br tag **doesn’t contain a closing tag** in an **[HTML](https://sharepointanchor.com/category/learn-html/ "HTML")** document. But in **XHTML** , it consists of both **opening br tag** and **closing br tag**.

```

Text <br> text

```

Note: Do **not use the br tag to create margins** between two paragraphs. Use the **[CSS](https://sharepointanchor.com/category/learn-css/ "CSS") margin property** to control their size.

## Sample of the HTML br Tag:

```

<!DOCTYPE html>
<html>
  <head>
    <title>Line Break Tag</title>
  </head>
  <body>
    <h1>Example of the <br> tag in HTML</h1>
    <p> Inside the paragraph, put the <br /> tag, <br> to transfer a part of the text to another line.</p>
  </body>
</html>

```

## Result:

![](https://sharepointanchor.com/wp-content/uploads/2021/02/Result-15.png)<figcaption>Result</figcaption>

### Sample of <br> tag for writing an address:

```

<!DOCTYPE html>
<html>
  <head>
    <title>Line Break Tag</title>
  </head>
  <body>
    <h3>Address:</h3>
    <p>Gloria,<br> 123 C, Elvin Avenue,<br> Mountain View,<br> California.</p>
  </body>
</html>

```

### Result:

![](https://sharepointanchor.com/wp-content/uploads/2021/02/Result-2-7.png)<figcaption>Result</figcaption>

<script async src="//jsfiddle.net/Share_Point_Anchor/5s7e8ka3/3/embed/html,result/"></script>

## Attributes:

The **<[br](https://en.wikipedia.org/wiki/Wikipedia:Line_breaks_usage)>** Line break tag in HTML supports both **Global Attributes** and the **Event Attributes**.

<style> th, td{ padding: 20px; } </style>

| Attributes | Value | Description |
| --- | --- | --- |
| clear | | The clear attribute specifies **how to process the next line if the text wraps around the floating element**.**(Not used in HTML5)** |
| all | Helps to **reverse the flow around the element**  **from the right and left edges at the same time**. |
| left | It will **reverse the flow from the left side of the element placed after the br tag**. |
| right | This value helps to **reverse the flow from the right side**. |
| none | It will **cancel the action of an attribute**. |

## Browser Support:

![](https://sharepointanchor.com/wp-content/uploads/2021/02/Browser-Support-3.png)<figcaption>Browser Support</figcaption>

### Related Articles:

- **[HTML <aside> Aside Tag](https://sharepointanchor.com/learn-html/html-aside-tag/)**
- **[HTML <basefont> Basefont Tag](https://sharepointanchor.com/learn-html/html-basefont-tag/)**
- **[Basic HTML Definitions and Usages in the Real World](https://sharepointanchor.com/learn-html/basic-html-definitions-and-usages-in-real-world/)**
- **[HTML <!– Comments –> Comments Tag](https://sharepointanchor.com/learn-html/html-comments-tag/)**
- **[HTML <big> Big Tag](https://sharepointanchor.com/learn-html/html-big-tag/)**

The post [HTML br Line Break Tag](https://sharepointanchor.com/learn-html/html-br-line-break-tag/) appeared first on [Share Point Anchor](https://sharepointanchor.com).