Validate required element order

Rule ID:
Content model
  • HTML5

Some elements has a specific order the children must use.

Rule details

Examples of incorrect code for this rule:

<!-- table caption must be used before thead -->
error: Element <caption> must be used before <thead> in this context (element-permitted-order) at inline:4:6:
  2 | <table>
  3 |     <thead></thead>
> 4 |     <caption></caption>
    |      ^^^^^^^
  5 | </div>

1 error found.

Examples of correct code for this rule: