[whatwg] text/html conformance checkers and comments
Lachlan Hunt
lachlan.hunt at lachy.id.au
Mon Jul 25 18:33:24 PDT 2005
Henri Sivonen wrote:
> What kinds of comments should a text/html HTML5 conformance checker allow?
All valid SGML comments should be allowed.
> <!-->
That's an incomplete comment, as it only contains a Markup Declaration
Open (MDO "<!") and the first comment delimiter "--". The ">" in this
case is actually commented out and would only be valid if were later
followed by a second comment delimiter and a Markup Declaration Close
(MDC ">") (i.e. <!--> ... -->)
> <!---->
> <!-- -->
> <!-- foo -->
> <!-- foo ---- bar -->
> <!-- foo -- -- bar -->
Yes, all of those are supported by browsers, so there is no reason not
too. But you missed two other valid variants that I can think of:
<!>
<!-- -- >
As useless as the first one may be, it seems to be supported with no
ill-effect by Deer Park Alpha 2, Opera 8 and IE6, so I see no reason to
call it invalid.
And these invalid variants:
<! -- -->
<!-- foo -- bar -->
--
Lachlan Hunt
http://lachy.id.au/
More information about the whatwg
mailing list