Self-closing tags... why no forward slash in a <br> tag?

I have recently started the Full-stack engineer path. Fairly early on, the <img> tag is described as self-closing, and has a forward slash at the end of the tag: <img />

Why no forward slash for the <br> tag? Surely the same rule would apply here and you’d end up with <br />. When I typed that when prompted for a line break tag, It told me this format was incorrect.

Regards
Robert

Hello,
My first instinct would be it’s because it’s entirely self-contained. i.e. you can’t add other attributes like img could have src, etc.
Having read up a touch, it turns out it depends on the version of html you’re using;

and it turns out img isn’t cut and dried either;

So, now I’ve muddied the waters a bit more for you, I’ll be off…:slight_smile:

1 Like

Thanks @pluginmaybe

Since my OP, I did come across this page:

https://www.tutorialspoint.com/What-is-the-correct-way-of-using-br-br-or-br-in-HTML

Your first link kind of clarifies a bit more.

Thanks
Robert

PS - Marked as solved