Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify SGML vs SGML (ENR+WWW) difference with "/>" #42

Open
zcorpan opened this issue Sep 9, 2021 · 0 comments
Open

Clarify SGML vs SGML (ENR+WWW) difference with "/>" #42

zcorpan opened this issue Sep 9, 2021 · 0 comments

Comments

@zcorpan
Copy link
Owner

zcorpan commented Sep 9, 2021

https://htmlparser.info/introduction/#sgml--early-html

As an interesting aside, when using the XML "/>" syntax in HTML, according to SGML rules it would trigger the SHORTTAG feature. When used on a void element, the slash just marks the end of the start tag, and the ">" is text content. Therefore, the following are equivalent:​

<link rel=​"stylesheet" href=​"style.css" />
<link rel=​"stylesheet" href=​"style.css">>

See https://news.ycombinator.com/item?id=27312143

Just skimming through the intro chapter I already spotted inaccuracies regarding SGML. For example:

The following are equivalent: <link rel="stylesheet" href="style.css" /> [and] <link rel="stylesheet" href="style.css">>

No they're not. The author should study the 1998 WebSGML adaptations to ISO 8879 (the SGML spec), and in particular the NETENABL IMMEDNET feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant