Skip to main content
added 581 characters in body
Source Link
Dave Land
  • 2.3k
  • 1
  • 18
  • 22

An HTML comment is not quite what youmany think it is. HTML is a form of SGML, in which comments are delimited by pairs of double-dashes (-- … --).

Truth: I am too lazy to tell you how many comments are represented by the above tag pollution, but it's a at least 10.

I got less lazy: This so-called "comment" actually consists of 10 comments, three words outside any comment (i.e., just bad SGML), and the beginning of a comment that is not terminated. It's a real mess:

<!--1----2----3----4----5-- HEADER BEGINS HERE --6----7----8----9----10-- -->

An HTML comment is not what you think it is. HTML is a form of SGML, in which comments are delimited by pairs of double-dashes (-- … --).

Truth: I am too lazy to tell you how many comments are represented by the above tag pollution, but it's a at least 10.

An HTML comment is not quite what many think it is. HTML is a form of SGML, in which comments are delimited by pairs of double-dashes (-- … --).

Truth: I am too lazy to tell you how many comments are represented by the above tag pollution, but it's at least 10.

I got less lazy: This so-called "comment" actually consists of 10 comments, three words outside any comment (i.e., just bad SGML), and the beginning of a comment that is not terminated. It's a real mess:

<!--1----2----3----4----5-- HEADER BEGINS HERE --6----7----8----9----10-- -->
added 18 characters in body
Source Link
Dave Land
  • 2.3k
  • 1
  • 18
  • 22

TL;DR: Unfortunately, no, it's not possible (and never will be).

An HTML comment is not what you think it is. HTML is a form of SGML, in which comments are delimited by pairs of double-dashes ("--"-- … "--"--).

Thus, any pair of a double-dashes inside a pair of angle brackets with an exclamation point after the opening bracket (<! ---- >) is a comment. The spec says it better than I can: http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4

which most of us would believe is parsed like this <!-- this is a comment --> is actually parsed like this:
<!-- this this is a comment    -->. It is an SGML declaration that is empty except for a comment.

TL;DR: Unfortunately, no, it's not possible.

An HTML comment is not what you think it is. HTML is a form of SGML, in which comments are delimited by pairs of double-dashes ("--" … "--").

Thus, any pair of a double-dashes inside a pair of angle brackets (< ---- >) is a comment. The spec says it better than I can: http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4

which most of us would believe is parsed like this <!-- this is a comment --> is actually parsed like this:
<!-- this is a comment  -->. It is an SGML declaration that is empty except for a comment.

TL;DR: Unfortunately, no, it's not possible (and never will be).

An HTML comment is not what you think it is. HTML is a form of SGML, in which comments are delimited by pairs of double-dashes (-- … --).

Thus, any pair of a double-dashes inside a pair of angle brackets with an exclamation point after the opening bracket (<! ---- >) is a comment. The spec says it better than I can: http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4

which most of us would believe is parsed like this <!-- this is a comment --> is actually parsed like this:
<!-- this is a comment  -->. It is an SGML declaration that is empty except for a comment.

added 326 characters in body
Source Link
Dave Land
  • 2.3k
  • 1
  • 18
  • 22

An HTML comment is not what you think it is. HTML is a form of SGML, in which comments are delimited by apairs of double-dash *"dashes ("--" … "--").

Thus, any pair of a double-dashes ("--" … "--") inside a pair of angle brackets ("<" … ">"< ---- >) is a comment. The spec says it better than I can: http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4

An HTML comment is not what you think it is. HTML is a form of SGML, in which comments are delimited by a double-dash *"--").

Thus, any pair of a double-dashes ("--" … "--") inside a pair of angle brackets ("<" … ">") is a comment. The spec says it better than I can: http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4

An HTML comment is not what you think it is. HTML is a form of SGML, in which comments are delimited by pairs of double-dashes ("--" … "--").

Thus, any pair of a double-dashes inside a pair of angle brackets (< ---- >) is a comment. The spec says it better than I can: http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4

added 326 characters in body
Source Link
Dave Land
  • 2.3k
  • 1
  • 18
  • 22
Loading
added 61 characters in body
Source Link
Dave Land
  • 2.3k
  • 1
  • 18
  • 22
Loading
Source Link
Dave Land
  • 2.3k
  • 1
  • 18
  • 22
Loading