XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / br
(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
HTML 4.01 | HTML 5 |
br
HTML: <br>; XHTML: <br/> or <br />
Inserts a line break, for example in a poem or postal address.
Start/end tag
This is an empty element. HTML forbids an end tag. In XHTML, the element must end with a slash before the closing angle bracket. Developers can insert a space before the slash to improve backward compatibility with older browsers.
Attributes
Core, global HTML 5 attributes
clear="none|left|right|all"Deprecated. Not available in HTML 5. Specifies where the line after the break should appear relative to elements defined as floats such as images moved to the document’s left or right edge. The default value
nonekeeps text in its normal position, wrapping around floats. The valueleftstarts the next line below floats at the document’s left edge. Similarly,rightstarts the next line below floats at the document’s right edge. The valueallplaces the next line below floats on both sides.
Example (HTML)
<p>O'Reilly Verlag<br>
Balthasarstraße 81<br>
50670 Köln</p>Example (XHTML)
<p>O'Reilly Verlag<br />
Balthasarstraße 81<br />
50670 Köln</p>
|
Copyright © 2010 O’Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from "HTML & XHTML ─ kurz & gut" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de