Jump to content

validator errors are mysterious


Abby

Recommended Posts

Here's my webpage in question. The CSS validates, but I don't understand some of the HTML validator error messages.document type does not allow element "A" here So it's finding fault with my <a name> tags. Do these not work with a Strict HTML dtd? If not, what sort of dtd should I use?I'm also getting a lot of these: document type does not allow element "DIV" here; missing one of "OBJECT", "MAP", "BUTTON" start-tagIt says the same thing for some of the "UL" and "TABLE" elements. I can't begin to guess how to fix these. I don't see anything wrong with my DIV or UL tags. Can someone please explain?Also, my footer is not rendering. [an error occurred while processing this directive] It's included in the HTML with a <!--#include virtual="/footer.html" --> I have no idea what's causing this problem. I use the exact same code on other pages, and the footer renders fine on those pages.
Link to comment
Share on other sites

It tells you what's wrong with your anchors right in the validator:

document type does not allow element "A" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag
You need to have the anchors (and any text, images, etc. for that matter) within one of the mentioned elements.The division-related errors are occurring because you never close your anchors, and block elements can't occur within anchors. This is a syntactic error, and the anchors should look like this:
<a name="top"></a>

Link to comment
Share on other sites

you also probably find strict, does not allow a inline element to be not within a block element.BAD:<body><a href="mypage.html">mypage</a><span> blah, blah, blah</span></body>GOOD:<body><div><a href="mypage.html">mypage</a></div><p><a href="mypage.html">mypage</a></p><ul><!-- block --><li><a href="mypage.html">mypage</a></li></ul><p><span> blah, blah, blah</span></p></body>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...