Skip to content

doctype-style

Reports a doctype keyword that is not in uppercase (<!doctype html>).

The keyword is case-insensitive, so the browser does not care; uppercase is the form the specification and most documents use, and one form keeps the files alike.

To fix, write <!DOCTYPE html>.

Reported
<!doctype html>
<title>x</title>
angular:
lint:
rules:
doctype-style: warn # off (default), warn, error
html:
lint:
rules:
doctype-style: warn # off (default), warn, error
svelte:
lint:
rules:
doctype-style: warn # off (default), warn, error
vue:
lint:
rules:
doctype-style: warn # off (default), warn, error

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

Suppress one line with sudsy-disable-next-line doctype-style in a comment of the file’s language.

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
html-validate doctype-style partial uppercase only, without the style option