Language Change Example
Accessibility Features of Example
- The default language for the web page is defined using the
langattribute andxml:langattribute. - The content on the web page that is in a language different from the declared default language of the web page is contained in a container element with the
langattribute to declare the language used.
HTML Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>iCITA: Language Example</title>
</head>
<body>
<h1>Language Example</h1>
<dl>
<dt>English</dt>
<dd>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 crité en français.</dd>
<dt>Spanish</dt>
<dd lang="es">Esta oración es escrita en español.</dd>
</dl>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>iCITA: Language Example</title>
</head>
<body>
<h1>Language Example</h1>
<dl>
<dt>English</dt>
<dd>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 crité en français.</dd>
<dt>Spanish</dt>
<dd lang="es">Esta oración es escrita en español.</dd>
</dl>
</body>
</html>
