<meta http-equiv=”Content-Language” content=”en”>
Defines the encoding of the whole page as English as far as the language set goes – in short, it tells the user agent (browser) to expect English language characters. It’s purely a technical declaration. There can be only one language declared in this tag.
The lang attribute applies to all HTML tags except applet, base, basefront, br, frame, frameset, iframe, param and script.
I find it most useful in the HTML, DIV and SPAN tags.
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” />
Tells the visitor/search engine what audience the text is intended for.
It’s perfectly possible for the meta http-equiv and html lang tags to be out of sync – for example, I declare the technical language of my Canadian websites to be English, but will have French and English on the same page at times, both with properly declared language tags (the language can be declared in spans, divs and other tags, not just the HTML one.
From a search engine standpoint, the most useful declaration of a language is via the HTML, Div, or Span language declaration, which describes the intended audience, rather than the meta-equiv, which only addresses the software that renders the language (i.e. the browser).
Naturally, both should exist and be proper, but the SE would only look at the language declaration of the content intended for the visitor, not the technical declaration of the document intended for the browser, as far as returning results to a searcher is concerned.
A document can declare more than one language or language group for a visitor, but only one for a user-agent (browser).
This means that the meta http-equiv=”Content-Language” tag can only reference one language – i.e. “en”
The Lang= or xml:lang= tags can reference several languages – i.e. “en, zh, pt, fr” or even local variants: “en-us” (US English).
One method of having more than one language on a page is by using the DIV or SPAN language attributes:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
Let us drink a carbonated beverage and sit on this chesterfield, ok?
Let’s drink a soda on the sofa, hey?
Let’s down a pop on the couch, eh?
Buvons une boisson carbonatée et reposons-nous sur ce Chesterfield.
This lets you tell the browser what to expect, but lets a search engine or screen reader how to deal with certain blocks of text.
Language and country codes are NOT case sensitive.