Skip to content

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

@zcorpan

Description

@zcorpan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions