---
title: "<html> has no lang attribute (a11y/html-has-lang)"
description: "a11y/html-has-lang: Screen readers pick pronunciation rules from lang; without it text may be read in the wrong language."
canonical: https://void-design.vercel.app/rules/a11y/html-has-lang
lastModified: 2026-09-16
---

# <html> has no lang attribute

`a11y/html-has-lang` · severity **error** · category Accessibility · detected by `void a11y` and `void audit`

## Why it matters

Screen readers pick pronunciation rules from lang; without it text may be read in the wrong language. Translation tools also rely on it.

## How to fix it

Set the page language on the root element.

## Example

```
<html lang="en">
```

## References

- https://dequeuniversity.com/rules/axe/4.13/html-has-lang

## More accessibility rules

`void a11y` reports 48 rules in this category. WCAG 2.2 AA through axe-core, plus checks axe can't do alone: visible keyboard focus, 24/44px target size on mobile, 320px reflow and disabled zoom.

- `label` Form field has no label — [a11y/label](https://void-design.vercel.app/rules/a11y/label)
- `select-name` Select element has no accessible name — [a11y/select-name](https://void-design.vercel.app/rules/a11y/select-name)
- `input-button-name` Input button has no accessible name — [a11y/input-button-name](https://void-design.vercel.app/rules/a11y/input-button-name)
- `input-image-alt` Image button has no alt text — [a11y/input-image-alt](https://void-design.vercel.app/rules/a11y/input-image-alt)
- `html-lang-valid` <html lang> is not a valid language tag — [a11y/html-lang-valid](https://void-design.vercel.app/rules/a11y/html-lang-valid)
- `document-title` Page has no <title> — [a11y/document-title](https://void-design.vercel.app/rules/a11y/document-title)
- `landmark-one-main` Page has no <main> landmark — [a11y/landmark-one-main](https://void-design.vercel.app/rules/a11y/landmark-one-main)
- `region` Content is outside landmark regions — [a11y/region](https://void-design.vercel.app/rules/a11y/region)

Detected by `void a11y` and `void audit`. Explain it in a terminal: `void rules a11y/html-has-lang`
