3 ms·
> but it deviates from it when it makes sense to do so I guess it's ok to take liberties when the "official spec" (WHATWG HTML? which version? a W3C snapshot?
by tannhaeuser 2y ago
> but it deviates from it when it makes sense to do so
I guess it's ok to take liberties when the "official spec" (WHATWG HTML? which version? a W3C snapshot? older redacted W3C spec? or even MDN as the author is saying elsewhere?) has evolved over the course of ten or more years, but the base and where the model deviates should be documented, shouldn't it?
Doing so might also help with the issues found when this was first discussed [1], such as the bogus hgroup deprecation and possibly related h1-h6 end-element tags. For context, hgroup is not WHATWG-deprecated even though it was never part of W3C HTML until 2021 and marked deprecated according to the author's consulted MDN reference (which is not canonical). What has changed (in a backward-incompatible way!) is its content model due to its role changing from providing a mechanism to prevent HTML outlining in ToC/navigational content as outlining has been removed alltogether.
See the details in [3], and you can use the referenced SGML DTD grammar for checking against that particular (arguably bogus and not anymore deserving of the "HTML 5" moniker) HTML version/snapshot, as well as earlier WHATWG and W3C HTML snapshots/recommendations.
[1]: https://lobste.rs/s/o9khjn/first_html_lsp_reports_syntax_errors https://lobste.rs/s/o9khjn/first_html_lsp_reports_syntax_err...
[2]: https://sgmljs.net/docs/html230116.html https://sgmljs.net/docs/html230116.html
[3]: https://sgmljs.net/blog/blog2303.html https://sgmljs.net/blog/blog2303.html