Skip to main content


The lang attribute of an <html> element must be present and should be valid.

Level: warning

Config value‚Äč

  1. true: enable rule
  2. false: disable rule

The following pattern are not considered rule violations:

<html lang="en"></html>

The following patterns are considered a rule violations:

<!-- missing lang tag -->
<!-- empty lang tag -->
<html lang=""></html>
<!-- invalid BCP 47 lang value -->
<html lang="-"></html>