21 ms·
> Moreover, besides self-closing tags, in HTML5 there are many optional tags. Those are (rooted in) SGML elements having start-element tag omission allowed, wh
by tannhaeuser 4y ago
> Moreover, besides self-closing tags, in HTML5 there are many optional tags.
Those are (rooted in) SGML elements having start-element tag omission allowed, whereas HTML's "self-closing tags" (in HTML5 parlance) correspond to elements having end-element tag omission allowed. In your example, SGML infers the missing tags for html, head, body, and p to arrive at the canonical form:
<html>
<head>
<title>Example Webpage</title>
</head>
<body>
<h1>Welcome to my webpage</h1>
<p>This is some content!</p>
</body>
</html>
Cf. http://sgmljs.net/blog/blog1701.html http://sgmljs.net/blog/blog1701.html (the TALK slides) explaining the inferences SGML does on the example input in detail