Validate permitted number of element occurrences

Rule ID:
Content model
  • HTML5

Some elements may only be used a fixed amount of times in given context.

Rule details

Examples of incorrect code for this rule:

<!-- table footer can only be used once -->
error: Element <tfoot> can only appear once under <table> (element-permitted-occurrences) at inline:4:6:
  2 | <table>
  3 |     <tfoot></tfoot>
> 4 |     <tfoot></tfoot>
    |      ^^^^^
  5 | </div>

1 error found.

Examples of correct code for this rule: