0

Questions about tags.

So what is the difference between <hr> and <hr/>? I also see <br> and <br/>. I know they are single tags so they dont need an ending tag. Is there a reason why you should use one over the other? Or does it not matter. Thanks in advanced!

15th Oct 2021, 8:36 AM
WebFreak
WebFreak - avatar
2 odpowiedzi
+ 3
Both are valid, just a difference in writing based on which standard is used. HTML style <br> <hr> XML style <br /> <hr /> XML standard requires empty tags (tags without a closing pair tag) to be explicitly closed, thus the <* /> style.
15th Oct 2021, 8:51 AM
Ipang
+ 1
Both truly are both similar
15th Oct 2021, 8:58 AM
Kehinde
Kehinde - avatar