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

What is the difference between <hr /> and <hr>

Horizontal lines in HTML

28th Aug 2018, 7:51 PM
Odelola Oluwaseun
Odelola Oluwaseun - avatar
2 Answers
+ 10
<hr /> it's used in previous version of the html just as <br />, in html5 we do not need it anymore they removed the forward slash making it <hr> and <br>.
28th Aug 2018, 8:27 PM
Vanumu Satish Kumar
Vanumu Satish Kumar - avatar
+ 5
No difference neither visually nor semantically, following HTML5 standards you should use the second one tho.
28th Aug 2018, 8:12 PM
Maz
Maz - avatar