M
Michael Laplante
(Sound of grinding teeth. . .)
I've solved my previous hyperlink issue in IE with the following:
<body>
<a name="top" id="top"> </a>
-- page content --
<div style="text-align: center">
<a href="#top">Back to top</a>
</div>
I've set the doc type to HTML4.01 strict. When I go to validate it though I
get this:
***
Below are the results of attempting to parse this document with an SGML
parser.
1.. Error Line 11 column 26: document type does not allow element "A"
here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
"ADDRESS" start-tag.
<a name="top" id="top"> </a>The mentioned element is not allowed to
appear in the context in which you've placed it; the other mentioned
elements are the only ones that are both allowed there and can contain the
element mentioned. This might mean that you need a containing element, or
possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a
block-level element (such as "<p>" or "<table>") inside an inline element
(such as "<a>", "<span>", or "<font>").
***
Why is <a> not allowed here? It's the first bit of code after <body> and
there is no block-level element contained within it, so what's the issue
here? Must it be enclosed in a <P> or other block level element to validate?
(I'm about to go off and do this but nothing on the w3 reference suggests
this is a necessity.)
FWIW, the WDG validator gave me a similar message.
M
I've solved my previous hyperlink issue in IE with the following:
<body>
<a name="top" id="top"> </a>
-- page content --
<div style="text-align: center">
<a href="#top">Back to top</a>
</div>
I've set the doc type to HTML4.01 strict. When I go to validate it though I
get this:
***
Below are the results of attempting to parse this document with an SGML
parser.
1.. Error Line 11 column 26: document type does not allow element "A"
here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
"ADDRESS" start-tag.
<a name="top" id="top"> </a>The mentioned element is not allowed to
appear in the context in which you've placed it; the other mentioned
elements are the only ones that are both allowed there and can contain the
element mentioned. This might mean that you need a containing element, or
possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a
block-level element (such as "<p>" or "<table>") inside an inline element
(such as "<a>", "<span>", or "<font>").
***
Why is <a> not allowed here? It's the first bit of code after <body> and
there is no block-level element contained within it, so what's the issue
here? Must it be enclosed in a <P> or other block level element to validate?
(I'm about to go off and do this but nothing on the w3 reference suggests
this is a necessity.)
FWIW, the WDG validator gave me a similar message.
M