<br> or <br/>? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

<br> or <br/>?

what is the difference between these 2 tags?

1st Oct 2017, 9:16 AM
Techa Lorax
2 Answers
+ 22
Simply <br> is sufficient. The other forms are there for compatibility with XHTML; to make it possible to write the same code as XHTML, and have it also work as HTML. Some systems that generate HTML may be based on XML generators, and thus do not have the ability to output just a bare <br> tag; if you're using such a system, it's fine to use <br/>, it's just not necessary if you don't need to do it. [https://stackoverflow.com/questions/1946426/html-5-is-it-br-br-or-br]
1st Oct 2017, 9:19 AM
Babak
Babak - avatar
+ 2
con <br> esta bien!
1st Oct 2017, 4:15 PM
Bladimir Reales
Bladimir Reales - avatar