doctype-html
Angular templatesHTMLVue / SvelteVue / Sveltecorrectnessno fixdefault: warnhtml/html-validate-standardhtml/htmlhint
What it does
Section titled “What it does”Reports a doctype that is not <!DOCTYPE html> (compared without regard to case), such as the HTML 4.01 public identifier.
Why it matters
Section titled “Why it matters”A doctype other than html puts the browser in quirks or limited-quirks mode, which changes how boxes, tables and images are sized.
To fix, use <!DOCTYPE html>.
Example
Section titled “Example”<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"><title>x</title>Configuration
Section titled “Configuration”angular: lint: rules: doctype-html: warn # off, warn (default), errorhtml: lint: rules: doctype-html: warn # off, warn (default), errorsvelte: lint: rules: doctype-html: warn # off, warn (default), errorvue: lint: rules: doctype-html: warn # off, warn (default), errorEnabled by the presets: html/html-validate-standard, html/htmlhint.
Suppress one line with sudsy-disable-next-line doctype-html 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 | doctype-html |
full |
| htmlhint | doctype-html5 |
full |