The HTML <br> tag inserts a single line break. A <br> tag is an empty tag which means that it has no end tag like other HTML tags(<p> tag, <div> tag, etc).
HTML <br> Tag :-
- It inserts a single line break .
- It is an empty tag without any end tag.
Here are few question on br tag can confused you in interview.
Which one use in HTML5: Is it <br>, <br/>, or <br />?
<br> tag is sufficient to break a line in HTML.
See below example:
<p>Text for break <br>HTML Horizontal line</p>
Read more: HTML Line Break br tag complete tutorial
Which is correct, </br> or <br/>?
Answers: Using <br> is just the correct and best way, no need for the forward slash.
<p>Text for break <br/>HTML Horizontal line</p>
<p>Text for break </br>HTML Horizontal line</p>
What is the difference between <br> and <br/> tag in HTML? Which one should we use?
Answers: The main difference between <br> and <br\> are :
HTML (up to HTML 4): use
<br> is preferred, but
<br /> is also acceptable.
<br /> is preferred. Can also use
<br /> is backwards-compatible with XHTML and well-formed HTML (ie: XHTML) is often easier to validate for errors and debug.
Do comment if you have any doubt and suggestion on this tutorial.