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
I find it most useful in the HTML,
DIV and SPAN tags.
Tells the visitor/search
engine what audience the text is
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.
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
A document can declare more than one
language or language group for a
visitor, but only one for a user-agent
This means that the meta
can only reference one language - i.e.
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