HTML BR (<br>) Tag
0 3474
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 |
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:
Share:
Comments
Waiting for your comments