disallows elements closed in the wrong order (close-order)

HTML requires elements to be closed in the correct order.

Rule details

Examples of incorrect code for this rule:

<p><strong></p></strong>
error: Mismatched close-tag, expected '</strong>' but found '</p>' (close-order) at inline:1:13:
> 1 | <p><strong></p></strong>
    |             ^^


error: Mismatched close-tag, expected '</p>' but found '</strong>' (close-order) at inline:1:17:
> 1 | <p><strong></p></strong>
    |                 ^^^^^^^


2 errors found.

Examples of correct code for this rule:

<p><strong></strong></p>