
The tags <br> and <br /> essentially do the same thing: create a line break in the text. The difference lies in how HTML has evolved over time.
<br>: This is the traditional way to insert a line break in HTML. It’s perfectly valid and widely used when you just need a simple line break.
<br />: This version is more commonly used in XHTML (a stricter version of HTML). The/is added to indicate that it’s a self-closing tag—a practice XHTML enforces to ensure tags are properly closed.
In compatible HTML5, both are acceptable, so it's mostly about which style you prefer or are required to use.
Just remember not to close a self-closing tag in this way: <br></br>—this is incorrect.
Hope this helps clear things up! Let me know if you have more questions.
Our Experts
Sanjeev PanditPrincipal Engineer
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Anuj ShresthaTech Lead
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer