> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# a11y-html-invalid-lang

> The html element has a malformed static language tag.

## What it flags

A nonempty static `<html lang="...">` value with malformed [BCP 47 syntax](https://www.rfc-editor.org/rfc/rfc5646.html#section-2.1). Private-use and grandfathered tags are accepted.

Values replaced before the browser reads the page are left alone: build-time placeholders such as `%lang%`, `%paraglide.lang%`, `%VITE_APP_LANG%`, `__LANG__` and `$LANG`, and template expressions such as `{{ locale }}`, `${locale}` and `<%= locale %>`. Any value holding `%`, `$`, `{`, `}`, `[`, `]`, `<`, `>`, `#`, `@` or `.`, or starting with `__`, counts as one. A malformed tag such as `en_US` or `en us` is still reported.

## How to review or fix

Set the language tag for the actual page content, for example `lang="en-US"`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.