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> tag is a void element, which means it has no content model.

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

Did you know: If a paragraph (<p> </p>) consists of nothing but a single <br> element, it represents a blank line? These lines mustn’t be used for presentation purposes.


This content originally appeared on Envato Tuts+ Tutorials and was authored by Andy Leverenz

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> tag is a void element, which means it has no content model.

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

Did you know: If a paragraph (<p> </p>) consists of nothing but a single <br> element, it represents a blank line? These lines mustn’t be used for presentation purposes.


This content originally appeared on Envato Tuts+ Tutorials and was authored by Andy Leverenz


Print Share Comment Cite Upload Translate Updates
APA

Andy Leverenz | Sciencx (2023-03-20T19:53:57+00:00) HTML Element: br. Retrieved from https://www.scien.cx/2023/03/20/html-element-br/

MLA
" » HTML Element: br." Andy Leverenz | Sciencx - Monday March 20, 2023, https://www.scien.cx/2023/03/20/html-element-br/
HARVARD
Andy Leverenz | Sciencx Monday March 20, 2023 » HTML Element: br., viewed ,<https://www.scien.cx/2023/03/20/html-element-br/>
VANCOUVER
Andy Leverenz | Sciencx - » HTML Element: br. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/03/20/html-element-br/
CHICAGO
" » HTML Element: br." Andy Leverenz | Sciencx - Accessed . https://www.scien.cx/2023/03/20/html-element-br/
IEEE
" » HTML Element: br." Andy Leverenz | Sciencx [Online]. Available: https://www.scien.cx/2023/03/20/html-element-br/. [Accessed: ]
rf:citation
» HTML Element: br | Andy Leverenz | Sciencx | https://www.scien.cx/2023/03/20/html-element-br/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.