Closed
Description
It has been 10 years since SGML-style comments were killed.
http://ln.hixie.ch/?start=1137799947&count=1
Reasons it's a parse error:
https://lists.w3.org/Archives/Public/public-whatwg-archive/2006May/0038.html
This has two benefits:
- Previously non-conforming syntax won't be made conforming, so pedantic HTML 4 implementations won't break with conforming HTML5 comments.
- Conforming HTML5 documents can be serialized as conforming XHTML5 document without data loss even when preserving comments. (Strictly speaking in XML processing it is legitimate to drop comments in the bit bucket, so in that sense, dropping comments would not be significant data loss. :-)
(Plus, it was helpful for authors to get a hint from the validator if their page was broken in legacy Firefox that implemented SGML-style comments.)
I think these reasons are no longer relevant. The XML processing case is adequately covered by https://html.spec.whatwg.org/multipage/syntax.html#coercing-an-html-dom-into-an-infoset and nobody cares about what was valid HTML4, and nobody cares about pre-2006 Firefoxes.
So I suggest we make this be allowed:
<!--------------------------------->