Wednesday 19 June 2002

Accessibility tip 02: Language

“You know what language you’re writing in,” says Mark Pilgrim, “so tell your readers… and their software.”

Since I’m using XHTML 1.0 Transitional, my <html> tag should read:

<html xmlns="" lang="en" xml:lang="en">

It turns out I was already ahead of the game—I asked about this in my DOCTYPE post. And, as Dorothea Salo explains in the comments on that post, it’s another Belt & Suspenders solution:

HTML added the lang attribute to the tag long before XML came around… So doing both is another case of belt and suspenders. Non-XML-grokking HTML engines will grab the lang attribute; XML-grokking engines can grab either.

Permalink | Technorati

© Copyright 2007 Jonathon Delacour