"Richard" <An*******@127.001> wrote in message
news:cp********@news3.newsguy.com...
The main reason I use <!--- comment ---> is because the editor I use won't
accept anything less.
<! comment > is not acceptable.
<!- comment > is not acceptable.
What you've just said is that you're using one wrong format because two
other wrong formats don't work. What have you got against using the right
format, the one with *two* hyphens on each end?
I have used the same style before with validated pages. So something else
may have triggered the errors.
I don't think so. When I run the following code through the validator:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<title>Comments</title>
<! comment >
<!- comment ->
<!-- comment -->
<!--- comment --->
<p>HELLO!</p>
I get the following error messages:
1. Line 3, column 0: character data is not allowed here
<! comment >
You have used character data somewhere it is not permitted to appear.
Mistakes that can cause this error include putting text directly in the body
of the document without wrapping it in a container element (such as a
<p>aragraph</p>) or forgetting to quote an attribute value (where characters
such as "%" and "/" are common, but cannot appear without surrounding
quotes).
2. Line 6, column 16: invalid comment declaration: found name character
outside comment but inside comment declaration
<!--- comment --->
3. Line 6, column 0: comment declaration started here
<!--- comment --->
In error message two, column 16 is the third hyphen in the second trio of
hyphens, and that particular hyphen is colored red. So that is indeed being
flagged as an error.
What I don't understand is why the version with *one* hyphen on each side is
accepted.