HTML ESLint

no-skip-heading-levels

Disallow skipping heading levels.

How to use

.eslintrc.js

module.exports = {
  rules: {
    "@html-eslint/no-skip-heading-levels": "error",
  },
};

Rule Details

This rule disallows skipping heading levels.

Examples of incorrect code for this rule:

<html>
  <body>
    <h1>head1</h1>
    <h3>head3</h3>
  </body>
</html>

Examples of correct code for this rule:

<html>
  <body>
    <h1>head1</h1>
    <h2>head2</h2>
  </body>
</html>

Further reading