Guest Kristin Posted February 19, 2006 Share Posted February 19, 2006 Can anyone recommend a site to learn more about the xmlns attribute for the html tag? How is it used?Specifically I've seen this example:<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">Does the above use replace:<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> ?How about for multi-lingual documents such as sites containing both English and Japanese text?I've tried searching the web, W3 Schools and W3.org for more information but haven't been able to find anything that really explains this attribute and it's uses very well. If anyone could point me to a good site with more information I'd be very appreciative.Thanks! Link to comment Share on other sites More sharing options...
boen_robot Posted February 19, 2006 Share Posted February 19, 2006 The xmlns defines an XML NameSpace. In other words: defines that what you are using is that particularly pointed XHTML. the xml:lang attribute is the new equivalent to the lang attribute. Some (most?) developers use both to ensure compatability. the lang attribute specifies a language that is used in that element. This information could be used by screen reader to adjust their voice and/or vocablulary specifically for the pointed language. It could also be used by CSS for language specific stylings and perhaps there are few more uses as well.If there are portions of different languages in the same document, you must add the appropriate lang attribute to each portion.No. This attribute is NOT equivalent to the meta charset thingy. What the meta tag describes is this case is the Character set that is used. Each language may have few charsets used. Think of it like this: you may speak (for example) Italian or English, but you still use latin letters. You may speak Bulgarian or Russian but you still use cyrilic letters, etc. etc. etc.In short: a language's Alphabet is not the same as the language itself. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now