br

< html‎ | elements
Jump to: navigation, search

br

This article is In Progress.


W3C Candidate Recommendation

Summary

The line break element, br, forces the current line of text to end and the text that follows it will being on a new line.


Overview Table

DOM Interface [[dom/HTMLBRElement|dom/HTMLBRElement]]

The br element forcibly breaks (ends) the current line of text, without starting a new paragraph.

br elements must be used only for line breaks that are actually part of the content, as in poems or addresses, but must not be used for separating thematic groups in a paragraph. For that you should use the paragraph element.

Any content inside br elements (i.e. attributes) must not be considered part of the surrounding text.


Compatibility

Do you think this data can be improved? You can ask to add by opening an issue or make a pull request.

Desktop

FeaturesChromeFirefoxInternet ExplorerOperaSafari
Basic support
1.0
Yes
?
Yes
?
Yes
?
Yes
?
Yes

Mobile

FeaturesAndroidFirefox MobileIE PhoneOpera MobileSafari Mobile
Basic support
?
Yes
?
Yes
?
Yes
?
Yes
?
Yes

Examples

View live exampleThe following example is correct usage of the br element

HTML

<p>P. Sherman<br>
42 Wallaby Way<br>
Sydney</p>

Usage

The br element is a “replaced element” which means it is comprised of a single tag with no content. You can apply attributes (e.g. class) to the tag, but it must not contain text.

As a replaced element, the br will be automatically closed by browsers, but you can also explicitly close the element with a trailing slash: <br/>

Notes

No closing tag is needed.


Related specifications

Specification Status Related Changes
HTML5 W3C Candidate Recommendation
HTML 4.01 Specification Recommendation

See also

Related articles

HTML






























  • br





















… further results

Text





































  • br














… further results