HTML <br/> Tag for Line Breaks in Paragraphs

 

ATTENTION: THIS PAGE IS Valid HTML 5 AND IS BEST VIEWED WITH HTML 5 - Please upgrade your browser or download one of the HTML 5 compatible browsers such as Mozilla Firefox, Chrome, Opera or IE 9 (March 14, 2011 or later). For more information see HTML 5 browsers.


If you find this helpful, please click the Google +1 Button to the left, if it is white, to make it turn blue or red. Thank you! (It also helps find this page again more easily.)


PDF mobile

The <br/> Tag in HTML 5

The break tag (<br/>) is used to force a line break in HTML code. It is one of the inline tags used to group and separate content in HTML. A similar tag, the <wbr/> tag, provides a way to suggest an optional line break to the web browser.

According to the HTML 5 specification, br elements must be used only for line breaks that are actually part of the content, as in poems or addresses. For example:

John & Jane Doe
123 Second St.
Riverside, LA 17654

This is an actual example of the <br> tag example code below.

For content other than things like addresses and poems, there are various alternatives to the <br/> tag for HTML code that can control how the content is laid out over multiple lines:


<br/> Break Tag Syntax

<body>
   ...
   ... phrasing content expected ...<br/>...
   ...
</body>
Rules for coding the HTML br element

Make sure you understand the difference between a tag and element and are familiar with the definitions of namespace and other HTML terms.

  1. Code the br element where phrasing content is expected.
  2. The br element consists of a standalone <br/> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the xmlns attribute on the <html> tag.
  3. Include any HTML global attributes on the <br> tag as appropriate.
  4. Since the br element is a void element, it should always be coded as a self-closing tag terminated with the delimiter string />.

<br/> Content Model

Contents of the <br/> Tag

Content: Empty. Any properties are coded using global attributes.

Since the <br/> tag is a void element, it is not allowed to have any content, even HTML comments and therefore should always be coded as a self-closing standalone tag, ending with the delimiter string /> rather than just > (<br/>).


<br/> Tag Attributes

Attributes of the <br> tag
global attributes In addition to the personal attributes of the <br> tag below, any of the common HTML attributes can also be coded.

<br/> Break Tag Examples

Examples of the br tag in HTML 5
<br> tag example
(see <br> tag demo above)
<p>John &amp; Jane Doe<br/>
123 Second St.<br/>
Riverside, LA 17654</p>

Changes in HTML 5 - <br/> Tag

What's new in HTML 5
Differences between HTML 5 and earlier versions of HTML

The following attributes should not be coded on the <br/> tag because they either have been deprecated or were never officially supported:

  • clear

In ployglot HTML documents the <br/> tag is coded as a self-closing tag the same as in the 2000-2010 Recommendations from the W3C HTML Working Group. Those specifications changed the ending delimiter to /> from > in older recommendations. They also defined the HTML namespace for the br element type name and the names of other HTML element types.


Valid HTML 5