---
title: "<html> without lang (next/html-lang)"
description: "The document language drives screen-reader pronunciation, translation prompts and search language targeting."
url: http://localhost:4173/rules/next/html-lang
updated: 2026-11-11
---

# <html> without lang

> `next/html-lang` is a vetd rule. It flags: <html> without lang. It runs on every `check`, together with the TypeScript check.

| Fact | Value |
| --- | --- |
| Rule id | `next/html-lang` |
| Severity | warning |
| Group | SEO, accessibility and security |
| Tags | accessibility, seo |

## Why it matters

The document language drives screen-reader pronunciation, translation prompts and search language targeting.

## How to fix it

Set it in the root layout: <html lang="en">.

## Credit

Based on work by:

- [W3C Web Accessibility Initiative](https://www.w3.org/WAI/): WCAG 3.1.1 requires the default human language of each page to be programmatically determinable.

## References

- [Understanding Success Criterion 3.1.1: Language of Page](https://www.w3.org/WAI/WCAG22/Understanding/language-of-page.html), W3C
- [lang HTML global attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/lang), MDN Web Docs
- [layout.js](https://nextjs.org/docs/app/api-reference/file-conventions/layout), Next.js

## Related rules

- [`next/img-alt`](http://localhost:4173/rules/next/img-alt.md)

## Get this text from vetd

MCP: call `explain` with `{ "diagnosticId": "next/html-lang" }`. CLI: `npx vetd explain next/html-lang`.

---

[All 92 rules](http://localhost:4173/rules.md) · Previous: [`next/img-alt`](http://localhost:4173/rules/next/img-alt.md) · Next: [`next/internal-anchor`](http://localhost:4173/rules/next/internal-anchor.md)
