Getting a validation error...

totalnewbie's picture

She has: 24 posts

Joined: Aug 2005

This error is stopping Dreamweaver from updating my library item. The funny thing is that everything worked fine until I added a new button to my library item.

Anyway, here is the error from W3C:
# Error Line 54 column 506: document type does not allow element "BODY" here.
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).

And here is the line of code in question:
<body onLoad="MM_preloadImages('../btnHomeDown.gif','../btnHomeOver.gif','../btnProductsDown.gif','../btnProductsOver.gif','../btnSponsorsDown.gif','../btnSponsorsOver.gif','../btnPicturesDown.gif','../btnPicturesOver.gif','../btnNewsDown.gif','../btnNewsOver.gif','../btnMembersDown.gif','../btnMembersOver.gif','../btnScheduleDown.gif','../btnScheduleOver.gif','../btnMissionDown.gif','../btnMissionOver.gif','../btnCardsDown.gif','../btnCardsOver.gif','../btnArchivesDown.gif','../btnArchivesOver.gif')">

Can someone tell me what I have done wrong?? I entered it all using Dreamweaver, and didn't write any code for this library item so I am confused as to how I got an error!

Thanks in advance, from a newbie!

demonhale's picture

He has: 3,278 posts

Joined: May 2005

maybe you have two tags in your html...

or possibly a whole block of code intended inside the tag located outside...

Can you show us the whole html???

Busy's picture

He has: 6,151 posts

Joined: May 2001

Are you validating in HTML or XHTML?
If XHTML then onLoad needs to be all lowercase

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.