Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

<br/> isn't an HTML 4 thing (it's an SGML thing, and hence goes back to the IIIR HTML draft and the original HTML (2!) standard): it has a very different meaning that most people think; it's the NET syntax (of the SHORTTAG feature of SGML), and is a br tag followed by a literal ">". The feature even gets mentioned in the HTML 4 spec: https://www.w3.org/TR/html4/appendix/notes.html#h-B.3.7

Of course, browsers never actually implemented this, which led to the ability to write "polyglot" markup which was both (de-facto) HTML and (de-jure) XHTML simultaneously.



nit: it's a WebSGML thing eg. an XML feature factored in to the revised SGML spec for accomodating XML-style empty elements, which was necessary so that XML could be DTD-less, yet still have a compact idiom for empty elements.

Classic SGML only had a shortform syntax such as

     <elmt/content of elmt/
and WebSGML introduced NETC and EMPTYRM to extend this into a (rather idiosyncratic) way of achieving support for XML-style empty elements within the SGML framework.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: