Require a specific case for DOCTYPE
- Rule ID:
- doctype-style
- Category:
- Style
- Standards:
- -
While DOCTYPE is case-insensitive in the standard this rule requires it to be a specific style. The standard consistently uses uppercase which is the default style for this rule.
Mixed case it not supported.
Rule details
Examples of incorrect code for this rule:
<!Doctype html>
Examples of correct code for this rule:
<!DOCTYPE html>
Options
This rule takes an optional object:
{
"style": "uppercase"
}
style
uppercase
requires DOCTYPE to be uppercase.lowercase
requires DOCTYPE to be lowercase.