A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/html/elements/br below:

br · WebPlatform Docs

br 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
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.

Examples

The following example is correct usage of the br element

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

View live example

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
HTML 5.1
W3C Working Draft
HTML 5
W3C Recommendation
HTML 4.01
W3C Recommendation
See also Related articles HTML Text

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4