Validation Error: "document type does not allow element "A" here..."

I’m stuck on this error (I’m getting a lot of these errors on the page):

Line 239, Column 73: document type does not allow element “A” here

…f=""[COLOR="Red"][U]>[/U][/COLOR] <img class="footerblocksocialfirst" src=

What does that mean and how do I fix it?

what else it says?

Give more details, There is a little reference to the possible solutions given by the validator below the error message.

This reference can give us a more specific idea about the exact problem there.

Here is the whole this thing but that’s all that it says for the particular error:

Error Line 239, Column 73: document type does not allow element “A” here

…f=“"[COLOR="Red”]>[/COLOR]<img class=“footerblocksocialfirst” src=

[B]The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements – such as a “style” element in the “body” section instead of inside “head” – or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML’s rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML’s “self-closing” tags for “meta” and “link” in the “head” section of a HTML document may cause the parser to infer the end of the “head” section and the beginning of the “body” section (where “link” and “meta” are not allowed; hence the reported error).

Hi, you probably forgot to close a tag somewhere and that is causing a whole lot of errors.

Make sure all tags line up.

Thanks! When you say “Make sure all tags line up.”, you mean I should make sure that all tags are closed, right?

you should be wrapping <a> tags inside an element that should be a child of <a> tags and instead.

you should always wrap child inside parent tags… Well I have just realized that some tags are not allowed to be wrap inside some tags. For instance

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>”).

Block-level element can not be wrap inside an inline-element

that’s incorrect.


So you should watch out for something like that…

Maybe you should post the html code here so someone can give you an idea weather you are wrapping some tags inside another tags which shouldn’t be wrapped in.

Thank you. You can find the code here:

Okay. I got rid of 31 out of 36 errors. You leave out one teensy quote mark and the whole page goes to shambles. Anyway, I fixed it… most of the errors, at least. Thank you for your help, all.

The remaining errors seem to relate to the JS at the bottom of the page. They might all clear up if you add in the red text and remove the blue:

<script [COLOR="Red"]type="text/javascript"[/COLOR] [COLOR="Blue"]language="JavaScript"[/COLOR] src="">

Ah, yes. I actually can’t edit that. Yahoo! Web Hosting automatically adds it to my pages after I upload it to their server. Is the “language=“JavaScript”” wrong because of the document type I’m using? I’m wondering if I should email Yahoo! and tell them to change their code the way you’ve suggested above.

Yes, the language attribute is totally deprecated, so it’s ridiculous that Yahoo is still using it. See here for more info.

Actually the reason the language attribute is used is because while javascript is the current scripting language used by browsers, at some point in the future it could change and by not specifying hwat language it is it will rely on the default, so if a browser changes and uses a different language the script will stop working.

Yes, but type=“text/javascript” is the current way to indicate what language is being used.

language=“JavaScript” is out of date.