What is the difference between the 2 lines shown below?:
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en-GB'> <meta http-equiv='content-language' content='en-GB' />
If i didn’t have the meta tag, what would be the consequence?
Does the meta one affect screen readers and the top one not? I’m a bit confused as to what exactly they do.
Thanks in advance for any help
Best regards
Skip.
Dive Into Accessibility’s Identifying your language page recommends adding as much as possible to handle as many screen readers as you can, depending on your doctype:
The same article also references ISO 639.2 to determine what the value of xml:lang should be, although the XML specification references a separate document, RFC4646 Best Current Practice – Tags For Identifying Languages, which seems to indicate your value of ‘en-GB’ is valid.
Google’s Web Authoring Statistics (2005) have the following to say about it:
Further, a thread on webproworld talks about the difference between using http-equiv=content-language and name=language to describe the language of the document and implies that both are necessary.
Finally, refer to the HTML Techniques for Web Content Accessibility Guidelines 1.0 document at W3C for some more recommendations, specifically Identifying the Primary Language.
In conclusion it looks like screen readers are looking at lang attributes more than content-language meta information, but most recommendations I’ve seen advise using meta data anyway. Especially the Google statistics seem pertinent, so perhaps you should leave both in.