Language tags in HTML and XML

The W3C article Language tags in HTML and XML explains how to choose the appropriate language code(s) and how to use them.

Further reading on that subject can be found in the working draft of Authoring Techniques for XHTML & HTML Internationalization: Specifying the language of content 1.0, which has recently been updated.

Posted on February 27, 2005 in (X)HTML, Quicklinks


  1. What is your personal opinion about internationalization? I personally blog in French from the University of Edinburgh. I am inevitably led to enrich my posts with a lot of English terms: many of my posts could be qualified as multilingual. In his book, Joe Clark also regrets this state of fact.

    I would like a “lang+lang” statement, such as “fr+en” to describe French as primary language and English as a secondary one that is susceptible to be found in many places in the text. I find it dissatisfying that the IANA found the time to work on a Klingon declaration instead of this crucial problem. As a result, I have given up, I do not add lang=en on every single quote because there too many.

    Side question: do you have trackback URLs? I cannot see them.

  2. February 27, 2005 by Roger Johansson (Author comment)

    I write some posts in Swedish and occasionally have articles in Swedish published elsewhere, and it’s of course very hard to write about any web related subject without using a lot of English terms. So I too write some posts that are bilingual.

    I don’t know about being able to specify a primary and a secondary language though. How would that be used? How would something like a screen reader know which words to pronounce in the secondary language? Wouldn’t you still need to use markup to somehow tell the user agent (screen reader, search engine, whatever) which words or phrases are in the secondary language?

    Re: trackbacks: Nope, no trackback links. Never got that to work properly (i.e. the way I want it to).

  3. I think I would work on a standalone tag instead of using ugly spans for strictly nothing. Of course this implies a small revolution: admitting lang can be a tage and an attribute at the same time. The actual norms are anyway too rigid to allow comprehensive multilinguism.

  4. “many of my posts could be qualified as multilingual […] I would like […] to describe French as primary language and English as a secondary” (phnk)

Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.