<br>

  • Revision slug: HTML/Element/br
  • Revision title: br
  • Revision id: 17716
  • Created:
  • Creator: jswisher
  • Is current revision? No
  • Comment 8 words added, 3 words removed

Revision Content

The HTML Line Break element (<br>) produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant. 

Usage Context

Permitted content None, it is a void element.
Tag omission Must have a start tag, and must not have an end tag. In XHTML documents, write this element as <br />.
Permitted parent elements Any elements that accepts phrasing content.
Normative document HTML5, section 4.6.23; HTML 4.01, section 9.3.2

Attributes

Like all HTML elements, this element has the global attributes.

clear
{{ deprecated_inline() }} in {{ HTMLVersionInline("4") }}, {{ obsolete_inline() }} in {{ HTMLVersionInline("5") }}; use the CSS clear property instead. Indicates where to begin the next line after the break.

Example

Mozilla Foundation<br>
1981 Landings Drive<br>
Building K<br>
Mountain View, CA 94043-0801<br>
USA

The HTML above outputs:

Mozilla Foundation
1981 Landings Drive
Building K
Mountain View, CA 94043-0801
USA

DOM Interface

Notes

Do not use <br> to increase the gap between lines of text; use the CSS margin property or the {{ HTMLElement("p") }} element.

See Also

  • {{ HTMLElement("address") }} element
  • {{ HTMLElement("p") }} element

{{ HTML:Element_Navigation() }}

{{ languages( { "pl": "pl/HTML/Element/br" } ) }}

Revision Source

<p>The HTML <em>Line Break</em> element (<code>&lt;br&gt;</code>) produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant. </p>
<h2>Usage Context</h2>
<table class="standard-table"> <tbody> <tr> <td>Permitted content</td> <td>None, it is a void element.</td> </tr> <tr> <td>Tag omission</td> <td>Must have a start tag, and must not have an end tag. In XHTML documents, write this element as <code>&lt;br /&gt;</code>.</td> </tr> <tr> <td>Permitted parent elements</td> <td>Any elements that accepts <a href="/en/HTML/Content_categories#phrasing_content" title="en/HTML/Content categories#phrasing content">phrasing content</a>.</td> </tr> <tr> <td>Normative document</td> <td><a class=" external" href="http://www.w3.org/TR/html5/text-level-semantics.html#the-br-element" title="http://www.w3.org/TR/html5/text-level-semantics.html#the-br-element">HTML5, section 4.6.23</a>; <a class=" external" href="http://www.w3.org/TR/html401/struct/text.html#h-9.3.2.1" title="http://www.w3.org/TR/html401/struct/text.html#h-9.3.2.1">HTML 4.01, section 9.3.2</a></td> </tr> </tbody>
</table>
<h2>Attributes</h2>
<p>Like all HTML elements, this element has the <a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">global attributes</a>.</p>
<dl> <dt>clear</dt> <dd>{{ deprecated_inline() }} in {{ HTMLVersionInline("4") }}, {{ obsolete_inline() }} in {{ HTMLVersionInline("5") }}; use the CSS <a href="/en/CSS/clear" title="en/CSS/clear">clear</a> property instead. Indicates where to begin the next line after the break.</dd>
</dl>
<h2>Example</h2>
<pre>Mozilla Foundation&lt;br&gt;
1981 Landings Drive&lt;br&gt;
Building K&lt;br&gt;
Mountain View, CA 94043-0801&lt;br&gt;
USA
</pre>
<p>The HTML above outputs:</p>
<p>Mozilla Foundation<br>
1981 Landings Drive<br>
Building K<br>
Mountain View, CA 94043-0801<br>
USA</p>
<h2>DOM Interface</h2>
<ul> <li><a href="/en/DOM/HTMLBRElement" title="en/DOM/HTMLBRElement">HTMLBRElement</a></li>
</ul>
<h2>Notes</h2>
<p><em>Do not</em> use <code>&lt;br&gt;</code> to increase the gap between lines of text; use the <a href="/en/CSS" title="en/CSS">CSS</a> <a href="/en/CSS/margin" title="en/CSS/margin">margin</a> property or the {{ HTMLElement("p") }} element.</p>
<h3 name="See_also">See Also</h3>
<ul> <li>{{ HTMLElement("address") }} element</li> <li>{{ HTMLElement("p") }} element</li>
</ul>
<p>{{ HTML:Element_Navigation() }}</p>
<p>{{ languages( { "pl": "pl/HTML/Element/br" } ) }}</p>
Revert to this revision