3 ms·
Takes up space without adding any substance. Jokes aside, that space before the / exists as a habit because Internet Explorer couldn't handle tags like <br/>,
by Freak_NL 6y ago
Takes up space without adding any substance.
Jokes aside, that space before the / exists as a habit because Internet Explorer couldn't handle tags like <br/>, so in order to have valid XML that worked in IE as well you would do <br />.
Completely pointless nowadays of course, although I do like the / for single elements. It's kind of nice to be able to write HTML5 and XML both with roughly the same syntax.
- bobince 6y agoOh it's older than that, even. IE was always fine without the space. It was for Netscape. So, sure, maybe there's a good reason to want XML-compatible syntax. But Netscape 4 users? Let's hope not!