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 none keeps text in its normal position, wrapping around floats. The value left starts the next line below floats at the document’s left edge. Similarly, right starts the next line below floats at the document’s right edge. The value all places 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>

 

> back to the alphabetical list of elements

   

 

 

 

back to top