Require elements to be closed in correct order
- Rule ID:
- close-order
- Category:
- HTML Syntax and concepts
- Standards:
- HTML5
HTML requires elements to be closed in the correct order.
Rule details
Examples of incorrect code for this rule:
<!-- closed in wrong order -->
<p><strong></p></strong>
<!-- opened but not closed -->
<div>
<!-- closed but not opened -->
</div>
Examples of correct code for this rule:
<p><strong></strong></p>
<div></div>