Guides · Accessibility basics

Page language (html lang)

One of the checks in every audibot report. This page says exactly what audibot reads, what passes, and how to fix it.

What audibot checks

Whether the <html> element has a lang attribute.

Why it matters

Screen readers choose a voice and pronunciation from lang. Without it they use the user's default, so an English page can be read with French pronunciation. Browsers also use it to offer translation and to hyphenate.

How do I set the language of a web page?

Set lang on <html> to the page's language as a BCP 47 tag. Mark passages in another language with their own lang.

HTML

<html lang="en">
…
<p>The motto is <span lang="la">festina lente</span>.</p>

Related tools

Other checks in Accessibility basics

Accessibility basics in the methodology ·All guides

This check is one step of the website launch checklist.

Check your site

audibot runs this check and every other one in a single audit, and publishes the report with a recommendation for each finding.