List of rules
Possible errors
Doctype and Head
doctype-first
: Doctype must be declared first.doctype-html5
: Invalid doctype.html-lang-require
: The HTML lang attribute is required.head-script-disabled
: The<script>
tag cannot be used in a tag.style-disabled
:<style>
tags cannot be used.script-disabled
:<script>
tags cannot be used.title-require
:<title>
must be present in<head>
tag.
Attributes
attr-lowercase
: All attribute names must be in lowercase.attr-no-duplication
: Elements cannot have duplicate attributes.attr-no-unnecessary-whitespace
: No spaces between attribute names and values.attr-unsafe-chars
: Attribute values cannot contain unsafe chars.attr-value-double-quotes
: Attribute values must be in double quotes.attr-value-single-quotes
: Attribute values must be in single quotes.attr-value-not-empty
: All attributes must have values.attr-sorted
: Attributes should be sorted in order.attr-whitespace
: No leading or trailing spaces in attribute values.alt-require
: The alt attribute of an element must be present and alt attribute of area[href] and input[type=image] must have a value.input-requires-label
: All [ input ] tags must have a corresponding [ label ] tag.
Tags
tags-check
: Allowing specify rules for any tag and validate thattag-pair
: Tag must be paired.tag-self-close
: Empty tags must be self closed.tagname-lowercase
: All html element names must be in lowercase.tagname-specialchars
: Tag names can only contain letters, numbers, "-", ":" or "_".empty-tag-not-self-closed
: The empty tag should not be closed by self.src-not-empty
: The src attribute of an img(script,link) must have a value.href-abs-or-rel
: An href attribute must be either absolute or relative.
Id
id-class-ad-disabled
: The id and class attributes cannot use the ad keyword, it will be blocked by adblock software.id-class-value
: The id and class attribute values must meet the specified rules.id-unique
: The value of id attributes must be unique.
Inline
inline-script-disabled
: Inline script cannot be used.inline-style-disabled
: Inline style cannot be used.
Formatting
space-tab-mixed-disabled
: Do not mix tabs and spaces for indentation.spec-char-escape
: Special characters must be escaped.