CommentsEnd Tag: RequiredSupport Key: Comment: 2 | 3 | 3.2 | 4 | IE1 | M1 | N | O <!-- -->: 2 | 3 | 3.2 | 4 | IE1 | M1 | N1 | O2.1 |
What is it? Attributes Tag Example |
Parent/Content Model Tips & Tricks Browser Peculiarities |
= Index DOT Html by Brian Wilson [bloo@blooberry.com] = |
"To include comments in an HTML document, use a comment declaration. A comment declaration consists of `<!' followed by zero or more comments followed by `>'. Each comment starts with `--' and includes all text up to and including the next occurrence of `--'. In a comment declaration, white space is allowed after each comment, but not before the first comment. The entire comment declaration is ignored."The strict view on this definition appears to allow multiple comment structures (such as <!-- hello -- -- there -->) to be legal. Also, under this interpretation, scripting expressions containing decrement operators (which is allowed in JavaScript) could prematurely end the parsing of a comment structure (with possibly undesired results.) Not all browsers interpret SGML comments the same, or this strictly, so keep this in mind when testing your documents.