heading level (heading-level)

Validates heading level increments and order. Headings must start at h1 and can only increase one level at a time.

Rule details

Examples of incorrect code for this rule:

<h1>Heading 1</h1>
<h3>Subheading</h3>
2:1 - Heading level can only increase by one, expected h2

Examples of correct code for this rule:

<h1>Heading 1</h1>
<h2>Subheading</h2>