no-void-end-tag
Angular templatesHTMLVue / SvelteVue / Sveltecorrectnessno fixdefault: warnhtml/html-validate-standard
What it does
Section titled “What it does”Reports an end tag of a void element (</br>, </img>).
Why it matters
Section titled “Why it matters”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.
Example
Section titled “Example”<!DOCTYPE html><title>x</title><br></br><p>x</p>Configuration
Section titled “Configuration”angular: lint: rules: no-void-end-tag: warn # off, warn (default), errorhtml: lint: rules: no-void-end-tag: warn # off, warn (default), errorsvelte: lint: rules: no-void-end-tag: warn # off, warn (default), errorvue: lint: rules: no-void-end-tag: warn # off, warn (default), errorEnabled 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.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| html-validate | void-content |
full |