The language attribute indicates the language of the element referred to by the tag. You may use this attribute on any tag which surrounds text, including <HTML>, <BODY>, <P> and so on.
This element is useful for many things, including but not limited to the following.
The format is as follows:
lang = primary-sub
where "primary" is the primary language code. These include:
Code Description de German el Greek en English es Spanish fr French hi Hindi it Italian ja Japanese nl Dutch ru Russian sa Sanskrit ur Urdu zh Chinese
And "sub" is a subcode indicating a sub-language. For example, en-US means English of the United States dialect. All of the subcodes are defined in the ISO 3166 specification.
<HTML lang="fr"> |
Indicates that the language of the entire HTML document is French.
<P lang="es"> |
The current paragraph is in Spanish.
Connect with me
Unless otherwise noted, all photos and text is Copyright © Richard G Lowe, Jr.