Note/Warning/Info In HTMl5, there is no End tag for the <br> tag.
HTML <br> tag
The <br> tag helps to add a line break inside a paragraph or block.
When you do not want to start a new paragraph but wish to insert a line break so that the next text/sentence should start from the next line, then you can use this <br> tag .
Syntax:
<br>
Example
<p>Agra is a city in northern India’s Uttar Pradesh state. <br>It’s home to the iconic Taj Mahal,<br>a mausoleum built for the Mughal ruler Shah Jahan’s wife, Mumtaz Mahal. </p>
Default CSS value
NONE
Difference between HTML4.01, XHTML and HTML5
HTML4 | XHTML | HTML5 |
---|---|---|
<br> tag does not have End tag | <br> tag should have End tag as - <br /> | <br> tag don't have End tag |
Attributes used with <br> tag
Attribute | Description |
---|---|
clear | This attribute controls how the next line will appear after the line break. It can take the followging values - (HTML5 does not support this attribute). |
Note/Info:
You should use the <br> tag for line breaks inside a paragraph or block. You should not use this 2 separate 2 paragraphs
Global Attributes
The <br> tag supports Global attributes.
Event Attributes
The <br> tag supports Event attributes.
Supporting Browsers
Related Tags
<hr> tag.