xml:lang - content-language

K

Klaus Trapp

Hello,

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.

Klaus

www.trappdata.de
 
B

Benjamin Niemann

Klaus said:
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.

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.
 

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,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top