According to § 3.2.4 of the HTML 4.01 specification,
HTML comments have the following syntax:
<!-- this is a comment -->
<!-- and so is this one,
which occupies more than one line -->
White space is not permitted between the markup declaration open delimiter("<!") and the comment open delimiter ("--"), but is permitted between the comment close delimiter ("--") and the markup declaration close delimiter (">"). A common error is to include a string of hyphens ("---") within a comment. Authors should avoid putting two or more adjacent hyphens inside comments.
Information that appears between comments has no special meaning (e.g., character references are not interpreted as such).
Note that comments are markup.
This definition is vague because it remains unclear whether the spaces after <!-- and before --> are part of the bracket (i.e., belong to the syntax) or of the contents (i.e., belong to the commented text). While HTML5 is clear about this (the spaces are NOT part of the bracket there), the spec of HTML4.01 is ambiguous in this matter at least in this part of the documentation. For example, we can ask:
<!--Strictly speaking, is this text without white spaces on both ends a comment of HTML4.01 according to its definition?-->
<!-- And how about this text with white space only at the head?-->
<!--And how about this text with white space only at the tail? -->
Questions:
Am I right concerning the ambiguity, or are there any other parts of the HTML4.01 definition clarifying this? (While there are usage examples without the spaces, say, in https://www.w3.org/TR/html4/strict.dtd, this DTD file is not an HTML document.)
In case the ambiguity does exist:
2.1. Is there any difference between the strict, transitional, and frameset HTML4.01 documents in this matter?
2.2. Is there any variety in the actual interpretation by the agents in this matter?