Toby A Inkster said:
Since you are confused about some basic stuff (no problem, many people
are), some annotations might be useful:
The correct term is 'comment declaration', which conveniently implies
some hints about syntax.
The actual comments are one or more matching pairs of SGML COM
delimiters ('--') which appear between the SGML delimiters
MDO (markup declaration open: '<!') and
MDC (markup declaration close '>')
of a comment declaration. While the first COM delimiter must
immediately follow MDO without whitespace in between, the common
misconception is that the closing delimiter string of the comment
declaration is '-->'.
It isn't; any SGML characters are allowed in a comment, short of the
COM delimiter string '--' (because, naturally, it closes the open
comment).
<!-- don't feed these --
-->multiple comments --
-- to your web wowser<!--
-- but they are correct --
There's no such thing like an '<html> tag'; it's problematic to mix up
syntax and semantics because it adds to the general confusion when
discussing either of them.
There are only two tags in HTML: start tag and end tag. They delimit
the range of an element (like, in this case, an instance of the HTML
element type), but the generic identifier (the name of the element
type) in the tag is a property of the element, *not* the tag. In some
cases the generic identifier doesn't even need to occur in the tag, eg:
<table>
<tr>
<td>a table data cell
<>and another one
</table>
What information would 'the said:
Yes, but I wouldn't recommend putting anything before the <!DOCTYPE...>
tag because this could (wrongly) throw some browsers into quirks mode.
I would recommend doing that for precisely that reason, or better omit
the declaration altogether for robust results. (I'm not sure what you
mean by 'wrongly', 'correct doctype sniffing' would be an oxymoron.)