Available rules

Rules with are enabled by html-validate:recommended.
Rules with are enabled by html-validate:document.

Additional presets can be compared in preset comparison.

attr-spacing Require attributes to be separated by whitespace
close-attr Disallow end tags from having attributes
close-order Require elements to be closed in correct order
deprecated Disallow usage of deprecated elements
deprecated-rule Disallow usage of deprecated rules
doctype-html Require usage of "html" doctype
element-name Disallow invalid element names
meta-refresh Require meta refresh to have 0 second delay
no-conditional-comment Disallow usage of conditional comments
no-deprecated-attr Disallow usage of deprecated attributes
no-dup-attr Disallow duplicated attributes
no-dup-class Disallow duplicated classes
no-dup-id Disallow duplicated IDs
no-raw-characters Disallow the use of unescaped special characters
no-redundant-for Disallow usage of redundant label for attributes
no-redundant-role Disallow usage of redundant roles
no-style-tag Disallow usage of <style> tag
no-unknown-elements Disallow usage of unknown elements
prefer-button Prefer to use <button> instead of <input> for buttons
prefer-tbody Prefer to wrap <tr> inside <tbody>
require-sri Require SRI for resources
script-type Require valid type for `<script>`
unrecognized-char-ref Disallow unrecognized character references

Content model

attribute-allowed-values Validate permitted attribute values
element-permitted-content Validate permitted content from content model
element-permitted-occurrences Validate permitted number of occurrences from content model
element-permitted-order Validate required order from content model
element-required-attributes Ensure required attributes are set
element-required-content Ensure required elements are present
no-multiple-main Disallow multiple `<main>`
script-element Require end tag for `<script>`
void-content Disallow void element with content


empty-heading Require headings to have textual content
empty-title Require title to have textual content
input-missing-label Require input to have label
multiple-labeled-controls Disallow labels associated with multiple controls
no-autoplay Disallow autoplaying media elements
prefer-native-element Prefer to use native HTML element over roles
svg-focusable Require <svg> to have focusable attribute
text-content Require elements to have valid text content
wcag/h30 WCAG 2.1 H30: Providing link text
wcag/h32 WCAG 2.1 H32: Providing submit buttons
wcag/h36 WCAG 2.1 H36: Require alt text on images used as submit buttons
wcag/h37 WCAG 2.1 H37: Using alt attributes on img elements
wcag/h67 WCAG 2.1 H67: Using null alt text and no title attribute on img elements
wcag/h71 WCAG 2.1 H71: Providing a description for groups of form controls


long-title Require title not to have too long text


attr-case Require a specific case for attribute names
attr-quotes Require attribute quoting
attribute-boolean-style Require a specific style for boolean attributes
attribute-empty-style Require a specific style for empty attributes
class-pattern Require classes to match a specific pattern
doctype-style Require a specific case for DOCTYPE
element-case Require a specific case for element names
id-pattern Require IDs to match a specific pattern
no-implicit-close Require elements with optional end tags to be explicitly closed
no-inline-style Disallow inline style
no-self-closing Disallow self-closing elements
no-trailing-whitespace Disallow trailing whitespace
void Disallow void element with content
void-style Require a specific style for closing void elements


These rules is to be used on full documents.

allowed-links Disallow link types
heading-level Require headings to start at h1 and increment by one
missing-doctype Require document to have a doctype
no-missing-references Require all element references to exist
no-utf8-bom Disallow documents from having UTF-8 BOM