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

<hr> and/or <hr />

Can someone tell me which one is correct. When i type in '<h' the drop down list shows the hr tag and when i touch it, it shows '<hr>' but this course shows '<hr />'. So which one is correct ?

23rd Oct 2016, 11:37 AM
Munira Adamjee
Munira Adamjee - avatar
1 Answer
+ 2
Actually there's no difference.. As <hr> doesn't have any closing tag, therefore some programmers use a "/" after "hr" like: <hr /> .. It is more systematic way of coding HTML .. Always use <hr /> .. Same in the case of <br /> tag.. Hope it helps :) .. Please do upvote :)
23rd Oct 2016, 4:35 PM
Rajdip Saha
Rajdip Saha - avatar