Crawford Design


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="" lang="en" xml:lang="en"

For XML use xml:lang:

html xmlns="" 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"