--- title: require-lang description: >- Require lang attribute on the html element for accessibility and internationalization. --- # require-lang This rule enforces the presence of the `lang` attribute on the `` tag. ## Why? The `lang` attribute in the HTML tag (``) is used to declare the language of the document. This attribute is important for accessibility and helps browsers, search engines, and other software understand the language of the content. ## How to use ```js,.eslintrc.js module.exports = { rules: { "@html-eslint/require-lang": "error", }, }; ``` ## Rule Details Examples of **incorrect** code for this rule: ```html,incorrect ... ... ``` Examples of **correct** code for this rule: ```html,correct ... ``` ## Further Reading - [MDN: lang](https://developer.mozilla.org/ko/docs/Web/HTML/Global_attributes/lang)