3 ms·
> The S-expression printed representation you see in your source can be less verbose than HTML, such as by not needing HTML element end tags Tag inference/omis
by tannhaeuser 7y ago
> The S-expression printed representation you see in your source can be less verbose than HTML, such as by not needing HTML element end tags
Tag inference/omission in SGML (and by extension HTML when seen as an application of SGML) is way more powerful. A minimal, valid HTML document is this:
<title>Whatever title</title>
<p>Text goes here
SGML's tag inference, when coupled with a DTD for HTML5 such as mine [1], will treat that as equivalent to this:
<html>
<head>
<title>Whatever title</title>
</head>
<body>
<p>Text goes here</p>
</body>
</html>
See details in slides or paper linked from [2].
[1]: http://sgmljs.net/docs/w3c-html51-dtd.html http://sgmljs.net/docs/w3c-html51-dtd.html
[2]: http://sgmljs.net/blog/blog1701.html http://sgmljs.net/blog/blog1701.html
- neilv 7y agoNeat that you've done this for HTML5. Early Web browsers tended to do some of that (with less-rigorous semantics, some of which I approximated in my early HTML parser). Consequently, Web pages in practice often did, too. Maybe that could make manual writing of documents in HTML5 more practical. For bits of HTML embedded in code lately, I've preferred a simpler model and syntax using S-expressions, but I could see the implied tags as very useful for handwriting documents SGML-style.