Crawford Design

Logo

Language Codes

Use language codes in a document to indicate the type accent to use for screen readers. Include the language code in the html tag.

For HTML use the lang attribute:

html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"

For XML use xml:lang:

html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"

Include both the HTML and XML language codes.

Clearly identify changes in the natural language of a document's text and any text equivalents. If there is a language change, from English to French, in a paragraph enclose the French in span tags with a French language code, fr.

span lang="fr"

References

Top