Definition
The <br> tag is used to add a line break or carriage-return in HTML.
Example
With Breaks:<br>
<br>
1600 Amphitheatre Parkway,<br>
Mountain View,<br>
CA 94043<br>
<br>
Without Breaks:
1600 Amphitheatre Parkway,
Mountain View,
CA 94043With Breaks:
1600 Amphitheatre Parkway,
Mountain View,
CA 94043
Without Breaks: 1600 Amphitheatre Parkway, Mountain View, CA 94043
1600 Amphitheatre Parkway,
Mountain View,
CA 94043
Without Breaks: 1600 Amphitheatre Parkway, Mountain View, CA 94043
Usage
- Add the
<br>tag where you wish for the line to break. - You must not use a closing tag.
Attributes
The <br> element only supports the Global Attributes.
Best Practices
- Do not use
<br>tags to create spacing between paragraphs. Use <p> tags and style using CSS. - Do not set a margin on
<br>tags to increase the spacing between lines. Use theline-heightproperty in CSS. - Because screen readers may announce
<br>tags without any content in them, it is considered bad practice to use them. Instead, use<p>elements along with CSS to display the information.
Specification
Browser Support
Desktop
| Chrome | Edge | Firefox | IE | Opera | Safari |
|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes |
Mobile
| Android Webview | Chrome Android | Firefox Android | Opera Android | iOS Safari | Samsung Internet |
|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes |
