Javatpoint Logo

91-9990449935

 0120-4256464

HTML br tag

HTML <br> tag or element is used to break line in a paragraph.

It is generally used in poem or address where the division of line is necessary.

It is an empty tag, means it does not need a company of end tag.

Don't use br tag for margin between two paragraphs, use CSS margin property instead.


Difference between HTML <br> and <br/>

You can use HTML br tag two ways: <br> or <br/>. It is recommended to use closed br tag <br/> because it is supported in HTML and XHTML both.


HTML br tag example

Test it Now

Output:

If you want to break line
in a paragraph,
use the br element.


BR tag in HTML and XHTML

In HTML br tag need not to be closed e.g. <br> whereas br tag must be properly closed in XHTML e.g. <br/>.


Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<br>YesYesYesYesYes

Note: The HTML br tag also supports the global and event attribute in HTML.


Next TopicHTML br tag