Wednesday, February 16, 2005

clarifiying the natural language

I have always known that in my HTML documents I was supposed to be declaring what the natural language of the document was. It is very clearly stated in the W3C's Web Content Accessibility Guidelines.
Guideline 4. Clarify natural language usage
Next guideline: 5 Previous guideline: 3 Go to contents
Use markup that facilitates pronunciation or interpretation of abbreviated or foreign text.

In HTML 4.01 it was -- <html lang="en">

In XHTML 1.0 they added -- <html xml:lang ="en">

I was never really sure which language declaration I was supposed to use or if I was supposed to use both. Different validators that I use would give me different answers.

Then I looked it up in XHTML 1.0 Specification.
C.7. The lang and xml:lang Attributes

Use both the lang and xml:lang attributes when specifying the language of an element. The value of the xml:lang attribute takes precedence.

So when your working on your websites make sure that you, "Use both the lang and xml:lang attributes."

0 Comments:

Post a Comment

<< Home