Skip to content

no-void-end-tag

Reports an end tag of a void element (</br>, </img>).

A void element has no content and no end tag, and the browser ignores </br>, but a stray </p> or </br> is one of the most common signs of markup that was converted wrongly.

To fix, remove the end tag.

Reported
<!DOCTYPE html>
<title>x</title>
<br></br>
<p>x</p>
angular:
lint:
rules:
no-void-end-tag: warn # off, warn (default), error
html:
lint:
rules:
no-void-end-tag: warn # off, warn (default), error
svelte:
lint:
rules:
no-void-end-tag: warn # off, warn (default), error
vue:
lint:
rules:
no-void-end-tag: warn # off, warn (default), error

Enabled by the presets: html/html-validate-standard.

Suppress one line with sudsy-disable-next-line no-void-end-tag in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
html-validate void-content full