BR (<br>) Tag

Last Updated by Ravinder 11-Feb-20

0 777


The HTML <br> tag is mostly used when there is a need of inserting a line break inside a paragraph. This tag is applicable in writing poems and home address. It acts as an empty tag containing no content i.e. doesn't need end tag.

Closing Bracket is optional in <br> tag.

Differences Between HTML 4.01 and HTML5

No difference in <br> tag

Differences Between HTML and XHTML

In HTML, <br> tag require no end tag
In XHTML, <br> tag require proper closing, for example: <br />

<br> tag support both global and event attributes and no default settings in CSS.

Browsers Support:

Google Chrome
Firefox
Safari
Internet Explorer

BR (<br>) Tag

BR (<br>) Tag

BR (<br>) Tag

BR (<br>) Tag

Code:

<!DOCTYPE html>
<html>
<body>
<p>This paragraph contains <br>a line break.</p>
<p>This paragraph contains <br>multiple <br>line breaks.</p>
</body>
</html>

Output:

BR (<br>) Tag


Share:


Leave a Reply


Comments
    Waiting for your comments