3 ms·
Well, the entire idea of SGML, on which HTML is based, is to use a custom markup vocabulary adequate for your project (this is distinctively more pronounced in
by tannhaeuser 6y ago
Well, the entire idea of SGML, on which HTML is based, is to use a custom markup vocabulary adequate for your project (this is distinctively more pronounced in SGML which originally always had to have a DTD than it is in XML with its various additional, optional schema mechanisms targeted at enterprise use). However, HTML is almost the same markup vocabulary for casual academic publishing at CERN it was 30 years ago; with everything around it (CSS, JS) having changed beyond recognition. It is understandable that once JS was out there (plus div and span generic containers), evolving HTML wasn't essential as you could always fallback to using JS. Styling factored out into an ever-growing ad-hoc language with low barriers to changes called CSS further contributed to the fossilization of HTML, yet the fixation towards a 1990s vision of HTML can't entirely be explained by these two factors alone. My guess is that HTML was locked in W3C's long-standing, failed attempt to replace SGML by its subset XML as meta-syntax. With WHATWG's HTML5, parsing was specified in a procedural way, and self-contained in the HTML spec itself rather than in reference to SGML or XML. The way the HTML5 grammar was presented, though, could only lead to further hindrance of its evolution since Ian Hickson captured only the result grammar of HTML4, but not its original construction rules and principles. For example, in [1] I make the point that
> By recovering HTML's original parsing rules from HTML5's specification text, we conclude that HTML5's parsing rules are represented adequately, and more succinctly, since avoiding redundantly specifying p-terminating elements.
> This interpretation is also supported by the fact that for the HTML5.1 specification update (vs. HTML5), the new details, figcaption, figure and menu elements (which are flow-only elements) but not the new picture element (which can also be used in phrasing content) have been added to the set of p-terminating elements.
All in all, HTML doesn't appear to be a rational, recommendable authoring format for any non-trivial writing project. After more than 30 years, it's still SGML that has all the power needed: can handle markdown and other custom Wiki syntax, can deal with and produce any HTML, has stylesheets and type-safe text macro expansion and templating. For the LISP lovers on HN, there's even the OpenJade project (dormant since about 2008 or so) for using Scheme-based DSSSL with SGML.
[1]: http://sgmljs.net/docs/html5.html http://sgmljs.net/docs/html5.html