Skip to content
Marcos Caceres edited this page Mar 27, 2026 · 7 revisions

lang

Type: string Default: "en"

Sets the language of the document. Corresponds to the lang attribute on the <html> element.

Basic usage

<html lang="fr">

Notes

  • Set directly on the <html> element, not in respecConfig
  • Use BCP 47 language tags (e.g. "en", "fr", "zh-Hans", "ar")
  • Some ReSpec-generated strings are localized for supported languages (see i18n support)
  • Always pair with the correct dir attribute for RTL languages

Guides

Configuration options

W3C Configuration options

Linting rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements

HTML attributes

CSS Classes

Special properties

Clone this wiki locally