By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,940 Members | 1,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,940 IT Pros & Developers. It's quick & easy.

what is diffrence between lang and xml:lang attribue inside xhtml document ?

P: 64
hi

i quoted the below text from http://www.w3schools.com site "lang is stand for language_code and Specifies a language code for the content in an element
xml:lang is stand for language_code and Specifies a language code for the content in an element, in XHTML documents"

in action, are lang and xml:lang in xhtml document the same? and are both of them supported by well-known browsers well?

thanks alot
May 21 '11 #1
Share this Question
Share on Google+
2 Replies


drhowarddrfine
Expert 5K+
P: 7,435
Since XHTML is HTML reformulated using XML, it uses a different 'namespace' to define elements. xml:lang tells the browser where to find the definition of lang in the XML namespace.

'lang' is defined in HTML with no namespace but it's the same thing. You're actually supposed to use both when serving XHTML as XHTML.
May 21 '11 #2

Dormilich
Expert Mod 5K+
P: 8,639
You're actually supposed to use both when serving XHTML as XHTML.
XHTML 1.0, that is.
May 23 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.