xml:lang versus lang

I was following an email thread when I hit this interesting link.

http://www.w3.org/TR/i18n-html-tech-lang/#ri20040429.092928424

It talks about best practices while specifying language for content served on HTML/XHTML/XML pages.
Quoting

"For HTML use the lang attribute only, for XHTML 1.0 served as text/html use the lang and xml:lang attributes, and for XHTML served as XML use the xml:lang attribute only."

e.g.

1. HTML

<helloWorld lang="en-US"/>

2.XHTML served as text/html
<helloWorld lang="en-US" xml:lang="en-US"/>

3. XHTML served as xml
<helloWorld xml:lang="en-US"/>

Bottomline -
Browser understands only "lang" for text/html content.
Dont use "lang" with XHTML 1.1. Its not in the spec. [Its okay in 1.0]

Comments:

It is the best time to make some plans for the future and it's time to be happy. I've read this post and if I could I wish to suggest you some interesting things or tips. Maybe you can write next articles referring to this article. I desire to read more things about it!

Posted by Bastien on April 26, 2011 at 07:34 AM PDT #

This is getting a bit more subjective, but I much prefer the Zune Marketplace. The interface is colorful, has more flair, and some cool features like 'Mixview' that let you quickly see related albums, songs, or other users related to what you're listening to. Clicking on one of those will center on that item, and another set of "neighbors" will come into view, allowing you to navigate around exploring by similar artists, songs, or users. Speaking of users, the Zune "Social" is also great fun, letting you find others with shared tastes and becoming friends with them. You then can listen to a playlist created based on an amalgamation of what all your friends are listening to, which is also enjoyable. Those concerned with privacy will be relieved to know you can prevent the public from seeing your personal listening habits if you so choose.

Posted by The Finance World is in a state of Flux on April 26, 2011 at 10:25 PM PDT #

This post is excellent and so is the manner in which the subject was explained. I like some of the comments as well even though I would rather we all keep it on topic so that to add value to the idea.

Posted by best cash isas on April 29, 2011 at 03:37 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Principal Product Manager

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today