At a guess, I'd say that the problem is caused by having your
javascript in the head of your document, which makes the validator try
to parse it (and so find <li>'s in the head, where no <li>'s should
be).

Simplest solution would be to move your javascript into an external
file and just link it into the head instead.

Cheers,

Seona.

2008/6/19 Fuji kusaka <[EMAIL PROTECTED]>:
> Can someone help me out with this validation?....
>
> this is a javascript for my menu which is inside my html page.
>
>
> Line 154, Column 39: document type does not allow element "li" here.
>
>             $back = $('<li class="back"><div
> class="left"></div></li>').appendTo
>
> ✉
>
> 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).
>
> --
> Fuji kusaka
> *******************************************************************
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: [EMAIL PROTECTED]
> *******************************************************************

*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to