Skip to main content

no-orphaned-end-tag

info

🔧 This rule supports auto-fix with the --fix option.

Warns when an end tag appears without a corresponding start tag, which constitutes an inner parse error in HTML Standard.

Note that while some tags (e.g., </br>) exhibit special behaviors, this rule uniformly warns without exceptions.

The end tag of an element whose start tag the HTML Standard lets the author omit (e.g., </body> after an omitted <body>) is not warned about, because it closes the element that the parser inserted.

❌ Examples of incorrect code for this rule

<div>
paragraph</br>with break</p>
</div>

✅ Examples of correct code for this rule

<div>
<p>paragraph<br />with break</p>
</div>

Interface​

{
"no-orphaned-end-tag": boolean
}

Default Severity​

error