What is the difference between <br> and <br/> ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the difference between <br> and <br/> ?

15th Sep 2017, 12:25 PM
abhishek s nair
abhishek s nair - avatar
3 Answers
+ 5
they both work fine but write code in good manners is a good practice !!
15th Sep 2017, 12:29 PM
Gaman Tyagi
Gaman Tyagi - avatar
+ 2
Both produce the same result. The former is the correct way to write in HTML5 while the latter is old XHTML style.
15th Sep 2017, 3:09 PM
Zephyr Koo
Zephyr Koo - avatar
Both have the same effect, however, second one is better.
15th Sep 2017, 3:17 PM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar