<br>

  • Revision slug: HTML/Element/br
  • Revision title: br
  • Revision id: 17711
  • Created:
  • Creator: Amaday39
  • Is current revision? No
  • Comment /* Summary */

Revision Content

Summary

Line break element produces a line break in text (carriage-return). It is an empty element, so it can't have any content and it can't have a closing tag (</br>). It is useful for writing a poem or address, where it is important to write everything on a new line. In XHTML documents, write this tag as <br />.

  • Allowed content: none

Example

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

Above HTML will output:

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

Notes

Do not use <br> to increase gap between text, use CSS margin property or paragraphs (<p>)

See also

{{ HTML:Element_Navigation() }}

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

Revision Source

<h3 name="Summary"> Summary </h3>
<p><b>Line break</b> element produces a line break in text (carriage-return). It is an empty element, so it can't have any content and it can't have a closing tag (<code>&lt;/br&gt;</code>). It is useful for writing a poem or address, where it is important to write everything on a new line. In XHTML documents, write this tag as <code>&lt;br /&gt;</code>.
</p>
<ul><li> Allowed content: none
</li></ul>
<h3 name="Example"> Example </h3>
<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>Above HTML will output:
</p><p>Mozilla Foundation<br>
1981 Landings Drive<br>
Building K<br>
Mountain View, CA 94043-0801<br>
USA
</p>
<h3 name="Notes"> Notes </h3>
<p><b>Do not</b> use <code>&lt;br&gt;</code> to increase gap between text, use <a href="en/CSS">CSS</a> <a href="en/CSS/margin">margin</a> property or <a href="en/HTML/Element/p">paragraphs</a> (<code>&lt;p&gt;</code>)
</p>
<h3 name="See_also"> See also </h3>
<ul><li> <a href="en/HTML/Element/address">HTML Address element</a>
</li><li> <a href="en/HTML/Element/p">HTML Paragraph element</a>
</li></ul>
<p>{{ HTML:Element_Navigation() }}
</p>{{ languages( { "pl": "pl/HTML/Element/br" } ) }}
Revert to this revision