<br>

  • Revision slug: HTML/Element/br
  • Revision title: br
  • Revision id: 17722
  • Created:
  • Creator: FreakCERS
  • Is current revision? No
  • Comment 1 words added

Revision Content

Summary

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

{{ htmlattrdef("clear") }} {{ deprecated_inline() }} in {{ HTMLVersionInline("4") }}, {{ obsolete_inline() }} in {{ HTMLVersionInline("5") }}
Indicates where to begin the next line after the break.

Usage note: This attribute is obsolete in {{ HTMLVersionInline("5") }} and should not be used by authors. Use the CSS clear property instead.

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", "en": "en/HTML/Element/br" , "fr": "fr/HTML/Element/br"} ) }}

Revision Source

<h2>Summary</h2>
<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 accept <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>{{ htmlattrdef("clear") }} {{ deprecated_inline() }} in {{ HTMLVersionInline("4") }}, {{ obsolete_inline() }} in {{ HTMLVersionInline("5") }}</dt> <dd>Indicates where to begin the next line after the break. <div class="note"> <p><strong>Usage note: </strong>This attribute is obsolete in {{ HTMLVersionInline("5") }} and <strong>should not be used by authors</strong>. Use the CSS <a href="/en/CSS/clear" title="en/CSS/clear">clear</a> property instead.</p> </div> </dd>
</dl>
<h2>Example</h2>
<pre class="brush: html">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", "en": "en/HTML/Element/br" , "fr": "fr/HTML/Element/br"} ) }}</p>
Revert to this revision