<br>
Published Jul 1, 2022
Contribute to Docs
The <br>
element represents a break in text. It is used when text needs to span multiple lines rather than being in-line, such as in an address.
Syntax
Text that will appear on one line.<br />Text that will appear on the next line.
The <br>
is a self-closing tag and will move the text after it to a new line. The forward-slash /
is optional.
Example
In the example below, text for an address is contained in a single <p>
element. If the address were to be printed on a label, it should be formatted in a standard way to avoid confusion. This is done with self-closing <br>
tags:
<html><head> </head><body><h3>Payment Address:</h3><p>5000 Sheffield Street <br />Suite #210 <br />Smithville Flats, MO, 11110</p></body></html>
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn HTML on Codecademy
- Career path
Front-End Engineer
Front-end engineers work closely with designers to make websites beautiful, functional, and fast.Includes 34 CoursesWith Professional CertificationBeginner Friendly115 hours - Free course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner Friendly7 hours