HTML Element: br
The <br>
element represents a line break. <br>
elements must be used only for line breaks that are part of the content, as in poems or addresses.
Example
Syntax
1 |
<p>John Doe <br> created a new account yesterday.</p> |
Result
Browser Support
The <br>
tag is supported in all modern browsers but must be used where phrasing content is expected. Read more on caniuse.com.
Attributes
The <br>
tag supports Global Attributes in HTML. Global Attributes are common to all HTML elements and can be used on all of them (though they may not have much of an effect on some of them).
Content
The br
element is a void element, which means it supports no content model and you can’t pass it any type of content.
Here’s a list of all void elements:
Gimme a Break
Is it <br>
, <br/>
or <br />
? There’s often confusion on which way to write the br
tag in today’s HTML5 standards.
<br>
is sufficient, and modern browsers are forgiving enough to convert other variants to that one. Remember that a br
tag is a self-closing tag so it doesn’t surround nor describe any content.
Learn More
<p> </p>
) consists of nothing but a single <br>
element, it represents a blank line? These lines mustn’t be used for presentation purposes.