+ 4

The app says <hr />, will work... but I have studied that <hr>... </hr> is correct... Which one is correct?

28th Aug 2017, 3:29 AM
Sagar Ambastha
Sagar Ambastha - avatar
2 Answers
+ 9
all of this will work correctly <hr>, <hr/>, <hr/>. the slash is needed when using xhtml, in html you are not needed to close <hr> element. this is a self closing element. you can check for yourself this one works '<hr/>' & '<hr>, '<hr />'. but not this one '</hr>'
28th Aug 2017, 3:42 AM
Lord Krishna
Lord Krishna - avatar
+ 2
<hr/> and <hr> will work, but don't try to close it, it's an empty tag...
28th Aug 2017, 3:18 PM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar