A A A A A

Language Changes in Web Resources Examples

HTML Markup Details

lang attribute
The lang attribute can be used on almost all elements to define the intended langauge of content of the element.
Two-character character codes from language value registry are used as the value of lang attribute.
xml:lang attribute
The xml:lang attribute can be used on the html element to define the default language of a web page.

Changes in Content Language Example

English
This sentence is written in English
German
Dieses ist Satz ist auf Deutsch
French
Cette phrase est crite en français
Spanish
Esta oración se escribe en español

HTML Source Code

<dl>
  <dt>English</dt>
  <dd lang="en">This sentence is written in English</dd>
  <dt>German</dt>
  <dd lang="de">Dieses ist Satz ist auf Deutsch</dd>
  <dt>French</dt>
  <dd lang="fr">Cette phrase est crite en francais</dd>
  <dt>Spanish</dt>
  <dd lang="es">Esta oracion se escribe en espnaol</dd>
</dl>

Navigation

Other HTML Best Practices

Working Group