HTML <br> Tag
To break line in a paragraph, the HTML <br> tag is used. It is especially useful for poem or address where the line break is necessary. Being an empty tag, it does not need a closing tag. The HTML <br> tag is not meant to be used for the margin between two paragraphs. CSS margin property can be used instead.
Use of HTML <br> and <br/> tags:
The HTML <br> tag need not be closed but in XHTML it must be properly closed like this: <br/>. The HTML <br> tag can however be used in both ways: <br> or <br/>. Since the <br/> tag is supported in HTML and XHTML both, it is thus recommended to use <br/> tag.
<!DOCTYPE html> <html> <body> <p> Hello World!!<br>How are you all?<br>Today is a great day for learning. </p> </body> </html>
In the above example, we have used the HTML <br> tag to break lines within a paragraph.
All the Global attributes are supported by the HTML <br> tag.
All the Event attributes are supported by the HTML <br> tag.
Chrome, IE, Firefox, Opera and Safari.