HTML Tags

HTML <br> Tag

The <br> tag inserts a line break in text, moving content to a new line.
It is an empty (self-closing) tag and is useful for breaking lines without starting a new paragraph.

Syntax

html

<br>

Attributes

AttributeDescription
classAssigns one or more class names for styling.
idAssigns a unique identifier to the line break.
styleAdds inline CSS styles.
titleProvides additional information as a tooltip.

Example

html

<!DOCTYPE html>
<html>
<head>
  <title>BR Tag Example</title>
</head>
<body>
  <h1>Line Break Example</h1>
  <p>This is the first line.<br class="line-break-example">This is the second line after a break.</p>
</body>
</html>

Output

Browser Output

html

Use our TryIt Editor to see the output.

Browser Support

Chrome
Edge
Firefox
Safari
Opera
IE9+
YesYesYesYesYesYes

The <br> tag itself is invisible but forces the following content to start on a new line within the same paragraph.

Notes

  • <br> is self-closing; it does not require an end tag.
  • It is commonly used inside <p> or other text containers to create line breaks.
  • Overusing <br> instead of proper paragraphs (<p>) can lead to poor HTML structure.
  • Can be styled with CSS if needed using class or id attributes.

Conclusion

The <br> tag provides a simple way to insert line breaks in text content without creating new paragraphs.
It is essential for formatting text within paragraphs or other inline content.