Definition

lang attribute

Updated Feb 9, 2026

Definition

The lang attribute is an HTML attribute on the <html> tag that declares the primary language of the page (e.g. lang="en").

Plain English

It tells browsers, screen readers, and search engines what language your page is written in.

Why it matters

  • Missing or wrong lang can hurt accessibility and hreflang signals.
  • Screen readers use it to select the correct pronunciation.
  • Search engines use it for language-specific indexing.