Making Accessible Websites for the United Nations

Page Design: Coding

Identify the Main Language

WAI Definition (Checkpoint 4.3)

Identify the primary language of the document text.


The primary language of a document is the natural language in which a document is written.


Screen readers need to know the natural language of a document in order for the words on the page to be pronounced correctly. Failing to identify the natural language could cause these devices to mispronounce the information making it impossible to understand. Identifying the natural language also improves search engine indexation.


The natural language should be identified in the <html> tag with:

The language codes for the six UN official languages are:

Refer to the ISO list of language codes for additional languages.



<html xmlns="" xml:lang="fr" lang="fr"> ....HTML document written in French... </html>



Check the source code.

Success Criteria

The proper language code is set for the <html> tag (as seen in the example above in bold).