xml:lang - content-language

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

what's the difference between
- http-equiv="content-language" content="de" in a meta-tag and
- xml:lang="de" in html-tag?
All my webpages contain german text.  



Re: xml:lang - content-language

Klaus Trapp wrote:

Quoted text here. Click to load it

Not much difference. Both specify the default language for the entire
document. xml:lang has the higher priority - if you use both xml:lang (or
lang for HTML docs) and <meta http-equiv="content-language"..> the former
will override the latter.
The xml:lang or lang attribute has the advantage that you can use it on any
element - indicating that a single paragraph or even word has a different
language than the default language.

Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de /

Site Timeline