br element

If you don't know what an element is or how you must use it, I recommend you read the "HTML tags and attributes" tutorial that you can find in the HTML tutorials section.

Description

The br element inserts a line break, causing text to continue in a new line.

This element should only be used for line breaks that are actually part of the flow of text. Its use for thematic or presentational separation is inadequate.

The clear attribute for this element has become obsolete in HTML5 and is now invalid. The results produced by this attribute can be achieved using style sheets.

Examples

Our first example shows a poem in which each line contains a break at the end, set with the br element. This is an example in which the use of the br element is appropriate, being the line breaks part of the structure of a poem.

<p>I love you without knowing how, or when, or from where<br>
I love you directly without problems or pride:<br>
I love you like this because I don’t know any other way to love,</p>
<p>except in this form in which I am not nor are you,<br>
so close that your hand on my chest is my hand,<br>
so close that your eyes close as I fall asleep.</p>

I love you without knowing how, or when, or from where
I love you directly without problems or pride:
I love you like this because I don’t know any other way to love,

except in this form in which I am not nor are you,
so close that your hand on my chest is my hand,
so close that your eyes close as I fall asleep.

Now, the address information of a person is divided in lines using the br element.

<p>
  John Snow<br>
  King's road 1648<br>
  Winterfell, Westeros
</p>

John Snow
King's road 1648
Winterfell, Westeros

Attributes

Specific attributes

clear

The position, relative to floating objects, where the next line should appear. Possible values are (case-insensitive):

  • none: The next line begins normally. This is the default value.
  • left: The next line begins at the nearest line below left-hand floating objects.
  • right: The next line begins at the nearest line below right-hand floating objects.
  • all: The next line begins at the nearest line below floating objects on either margin.

This attribute has become obsolete in HTML5 because of its presentational nature, and therefore, its use is no longer valid. Authors should replace it with style sheets declarations.

Example

<br clear="all">

Global attributes

For information about global attributes refer to this list of global attributes in HTML5.

Events

Global events

For information about global events refer to this list of global events in HTML5.