Declaring Languages in HTML and XHTML
There is a good summary of techniques for specifying the language of content at The Web Standards Project: Best Practices for Declaring Languages in HTML and XHTML.
Developers who never come in contact with other languages than English may not have much need for this, but for the rest of us a summary like this is very helpful.
I’d like to add one more guideline: Do not specify the language of a document in the DOCTYPE declaration. I have seen people do that too often. The language code in the DOCTYPE declaration declares the language of the document type definition that the DOCTYPE URI points to. For the W3C DTDs, that language is always English, so don’t go changing that //EN.
Subscribe / follow
- Front End Developer/Website Manager at Chapelboro.com / WCHL (Chapel Hill, NC, No, US)
- Manager of Engineering at Synacor, Inc. (Buffalo, NY, Ne, US)
- Publication and Textbook Designer at The Church of Jesus Christ of Latter-day Saints (Salt Lake City, UT, Ut, US)
- Web Developer at NYCEDC (New York, NY, Ne, US)
DreamHost web hosting
Use the promo code 456BEREASTREET3 to save USD 20 when you sign up for DreamHost