Jump to ContentJump to Navigation/Login
` ` ` ` ` `

[Register]

Occasional ATutor release updates


    (5 guests in past 15 min.)

    Access Understanding Web Accessibility to learn about accessibility, or Register to take the course for FREE.

    Support Forums

    ATutor Bug Reports

    lang attribute in xhtml 1.1


    You must be signed-in to post.

    AuthorSubject
      Page: 1
    louboumian

    Avatar for louboumian
    Subject: lang attribute in xhtml 1.1Quote this post in your reply
    Hello,
    I get a "Known problem" warning regarding the lack of language attribute in my xhtml declaration.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">


    The exemple given suggests to use lang and a 2 letter language code.
    When I insert that:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


    ...I get an HTML validation error saying that:
    Attribute "lang" exists, but can not be used for this element.

    What to do?

    Thanks for any pointer!
    Posted: 2009-09-20 13:37:14
    greg

    Avatar for greg
    Subject: Re: lang attribute in xhtml 1.1Quote this post in your reply
    Where is this declaration being used?
    Posted: 2009-09-20 13:46:31
    badeyes
    Subject: Re: lang attribute in xhtml 1.1Quote this post in your reply
    Try using

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


    cheers

    Geof
    Posted: 2009-09-20 13:57:21
    louboumian

    Avatar for louboumian
    Subject: Re: lang attribute in xhtml 1.1Quote this post in your reply
    in an index file starting with:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

    (I just reposted, I don't know what's going on with this forum, my Original Post disappeared from the list after I logged in again. Once I posted again, the original reappeared.. .weird)

    In reply to:
    Where is this declaration being used?

    Posted: 2009-09-20 22:35:31
    louboumian

    Avatar for louboumian
    Subject: Re: lang attribute in xhtml 1.1Quote this post in your reply
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    instead of

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    ???

    They are exactly the same. This line is what I tried after getting the 1 warning. This line then trigger an HTML validation warning saying the lang attribute exists but can't be used here.

    In reply to:
    Try using




    cheers

    Geof

    Posted: 2009-09-20 22:39:16
    harris

    Avatar for harris
    Subject: Re: lang attribute in xhtml 1.1Quote this post in your reply
    Hi,

    I am not sure why but your dtd is different than the one we use. Specifically, I have searched through our codes for "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" and I can't find anything. I believe this isn't an ATutor bug.

    For doctypes and the error message you are getting, I suggest you to check these two links out. One for the proper language code, the second link is for using the appropriate DTD.

    Error message:
    validator.w3.org/feed/docs/error/InvalidLanguage.html

    DTD:
    www.w3.org/QA/2002/04/valid-dtd-list.html


    Regards,
    Harris
    Posted: 2009-09-21 08:58:20
     Page: 1

    You must be signed-in to post.