correct use of lang attribute?

Discussion in 'HTML' started by The Bicycling Guitarist, Dec 19, 2004.

  1. 0001:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    0002:[1]^<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"
    xml:lang="en-US">
    ----:[1]^Warning: <html> has XML attribute "xml:lang".

    This warning from an online test of my home page supposedly indicates
    something that is NOT "good coding practice." Is it right? Should I remove
    the "xml:lang" part from every page?

    --
    The Bicycling Guitarist
    http://www.TheBicyclingGuitarist.net/
     
    The Bicycling Guitarist, Dec 19, 2004
    #1
    1. Advertising

  2. The Bicycling Guitarist

    Oli Filth Guest

    The Bicycling Guitarist wrote:
    > 0001:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    > 0002:[1]^<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"
    > xml:lang="en-US">
    > ----:[1]^Warning: <html> has XML attribute "xml:lang".
    >
    > This warning from an online test of my home page supposedly indicates
    > something that is NOT "good coding practice." Is it right? Should I
    > remove the "xml:lang" part from every page?
    >


    That validator is probably rubbish then, cause AFAIK you should definitely have
    the xml:lang attribute. See http://www.w3.org/TR/xhtml1/#strict for an example.

    Oli
     
    Oli Filth, Dec 19, 2004
    #2
    1. Advertising

  3. "Oli Filth" <> wrote in message
    news:qp7xd.2$...
    > The Bicycling Guitarist wrote:

    right? Should I
    >> remove the "xml:lang" part from every page?
    >>

    >
    > That validator is probably rubbish then, cause AFAIK you should definitely
    > have the xml:lang attribute. See http://www.w3.org/TR/xhtml1/#strict for
    > an example.
    >
    > Oli


    I want to go by w3 recommendations. Thanks Oli. The test was done by "Net
    Mechanic." I will ignore its warning.
     
    The Bicycling Guitarist, Dec 19, 2004
    #3
  4. The Bicycling Guitarist

    Richard Guest

    The Bicycling Guitarist wrote:

    > 0001:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    > 0002:[1]^<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"
    > xml:lang="en-US">
    > ----:[1]^Warning: <html> has XML attribute "xml:lang".


    > This warning from an online test of my home page supposedly indicates
    > something that is NOT "good coding practice." Is it right? Should I remove
    > the "xml:lang" part from every page?


    > --
    > The Bicycling Guitarist
    > http://www.TheBicyclingGuitarist.net/



    www.validator.w3.org/
     
    Richard, Dec 19, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. joon
    Replies:
    1
    Views:
    528
    Roedy Green
    Jul 8, 2003
  2. JPractitioner
    Replies:
    13
    Views:
    20,219
    Roedy Green
    Feb 24, 2006
  3. Dan

    correct or not correct?

    Dan, Oct 2, 2003, in forum: HTML
    Replies:
    7
    Views:
    461
  4. J.Ram
    Replies:
    7
    Views:
    670
  5. froil
    Replies:
    12
    Views:
    321
    Gunnar Hjalmarsson
    Mar 2, 2006
Loading...

Share This Page