Disallows multiple <main> elements in the same document (no-multiple-main)

HTML5 disallows multiple visible <main> element in the same document. Multiple <main> can be present but at most one can be visible and the others must be hidden using the hidden attribute.

Rule details

Examples of incorrect code for this rule:

error: Multiple <main> elements present in document (no-multiple-main) at inline:2:2:
  1 | <main>foo</main>
> 2 | <main>bar</main>
    |  ^^^^

1 error found.

Examples of correct code for this rule:

<main hidden>bar</main>