correct use of lang attribute?

  • Thread starter The Bicycling Guitarist
  • Start date
O

Oli Filth

The said:
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
 
T

The Bicycling Guitarist

Oli Filth said:
The Bicycling Guitarist wrote: right? Should I

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.
 
R

Richard

The said:
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?


www.validator.w3.org/
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top