Name

br — HTML 4.01 | HTML5

Synopsis

HTML: <br>; XHTML: <br/> or <br />

Inserts a line break in the content, such as in a poem or postal address.

Start/End Tags

This is an empty element. In HTML, the end tag is forbidden. In XHTML, the element must be closed with a trailing slash as just shown. Developers may include a space character before the slash for backward compatibility with older browsers.

Attributes

Core, HTML5 Global Attributes

clear="none|left|right|all"

Deprecated. Not in HTML5. Specifies where the next line should appear after the line break in relation to floated elements (such as an image that has been floated to the left or right margin). The default, none, causes the next line to start where it would normally. The value left starts the next line below any floated objects on the left margin. Similarly, right starts the next line below floated objects on the right margin. The value all starts the next line below floats on both margins.

Example (HTML)

<p>O'Reilly Media<br>
1005 Gravenstein Highway North<br>
Sebastopol, CA 95472</p>

Example (XHTML)

<p>O'Reilly Media<br />
1005 Gravenstein Highway North<br />
Sebastopol, CA 95472</p>

Get HTML & XHTML Pocket Reference, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.