Should we use <br>
or </br>
to create a line break? And what about the <hr>
tag, should it be written as <hr />
or just <hr>
?
I tested both <br>
and </br>
, and they seem to render the same. However, some online sources suggest that </br>
is better.
I’m a bit confused, especially regarding self-closing tags like <hr />
. Is spacing required in <hr />
, or is <hr/>
also acceptable?
What’s the correct and modern way to use the br tag and similar HTML elements?