Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

html-validate

Rules: 83

html-validate/area-alt

html-validate/area-alt · error · score 7.5 · page

Off by default; a group that runs html-validate, html-validate:a11y, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

aria-hidden must not be used on the <body> element as it makes the page inaccessible to assistive technology such as screenreaders

html-validate/aria-hidden-body · error · score 7.8 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/aria-label-misuse

html-validate/aria-label-misuse · error · score 6.9 · page

Off by default; a group that runs html-validate, html-validate:a11y, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Attribute name must be in lowercase.

html-validate/attr-case · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Attribute value must not be separated by whitespace.

html-validate/attr-delimiter · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/attr-quotes

html-validate/attr-quotes · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

No space between attributes. At least one whitespace character (commonly space) must be used to separate attributes.

html-validate/attr-spacing · error · score 6.6 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/attribute-allowed-values

html-validate/attribute-allowed-values · error · score 6.7 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Require a specific style when writing boolean attributes.

html-validate/attribute-boolean-style · error · score 6.7 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Require a specific style for attributes with empty values.

html-validate/attribute-empty-style · error · score 6.7 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/attribute-misuse

html-validate/attribute-misuse · error · score 6.7 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/autocomplete-password

html-validate/autocomplete-password · error · score 6.8 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

HTML disallows end tags to have attributes.

html-validate/close-attr · error · score 6.7 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

HTML requires elements to be closed in the same order as they were opened.

html-validate/close-order · error · score 9.0 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/deprecated

html-validate/deprecated · error · score 6.6 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

HTML5 documents should use the “html” doctype (short form, not legacy string):

html-validate/doctype-html · error · score 6.6 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/doctype-style

html-validate/doctype-style · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Element tagname must be in lowercase.

html-validate/element-case · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/element-name

html-validate/element-name · error · score 6.7 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/element-permitted-content

html-validate/element-permitted-content · error · score 8.7 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Some elements may only be used a fixed amount of times in given context.

html-validate/element-permitted-occurrences · error · score 8.4 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Some elements has a specific order the children must use.

html-validate/element-permitted-order · error · score 8.5 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/element-permitted-parent

html-validate/element-permitted-parent · error · score 8.9 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/element-required-ancestor

html-validate/element-required-ancestor · error · score 8.8 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/element-required-attributes

html-validate/element-required-attributes · error · score 8.2 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/element-required-content

html-validate/element-required-content · error · score 8.3 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Assistive technology such as screen readers require textual content in headings. Whitespace only is considered empty.

html-validate/empty-heading · error · score 7.2 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

The <title> element cannot be empty, it must have textual content.

html-validate/empty-title · error · score 7.0 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/form-dup-name

html-validate/form-dup-name · error · score 7.0 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Headings must start at <h1> and can only increase one level at a time.

html-validate/heading-level · error · score 7.1 · page

Off by default; a group that runs html-validate, html-validate:document turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

aria-hidden cannot be used on focusable elements.

html-validate/hidden-focusable · error · score 7.7 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/input-attributes

html-validate/input-attributes · error · score 6.8 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Each form element must have an a label or accessible name.

html-validate/input-missing-label · error · score 7.3 · page

Off by default; a group that runs html-validate, html-validate:document turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Search engines truncates titles with long text, possibly down-ranking the page in the process.

html-validate/long-title · error · score 7.0 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

<map> must have a unique name, it cannot be the same name as another <map> element

html-validate/map-dup-name · error · score 7.0 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

When the id attribute is present on a <map> element it must be equal to the name attribute.

html-validate/map-id-name · error · score 7.0 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Meta refresh directive must use the 0;url=... format. Non-zero values for time interval is disallowed as people with assistive technology might be unable to read and understand the page content before automatically reloading. For the same reason skipping the url is disallowed as it would put the browser in an infinite loop reloading the same page over and over again.

html-validate/meta-refresh · error · score 7.1 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Requires that the document contains a doctype.

html-validate/missing-doctype · error · score 9.1 · page

Off by default; a group that runs html-validate, html-validate:document turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

A <label> element can only be associated with one control at a time.

html-validate/multiple-labeled-controls · error · score 7.4 · page

Off by default; a group that runs html-validate, html-validate:a11y, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/no-abstract-role

html-validate/no-abstract-role · error · score 7.1 · page

Off by default; a group that runs html-validate, html-validate:a11y, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/no-autoplay

html-validate/no-autoplay · error · score 7.6 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Microsoft Internet Explorer previously supported using special HTML comments (conditional comments) for targeting specific versions of IE but since IE 10 it is deprecated and not supported in standards mode.

html-validate/no-conditional-comment · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

HTML5 deprecated many old attributes.

html-validate/no-deprecated-attr · error · score 6.6 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

HTML disallows two or more attributes with the same (case-insensitive) name.

html-validate/no-dup-attr · error · score 6.7 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Prevents unnecessary duplication of class names.

html-validate/no-dup-class · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

The ID of an element must be unique.

html-validate/no-dup-id · error · score 7.9 · page

Off by default; a group that runs html-validate, html-validate:a11y, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

<button> is missing recommended type attribute

html-validate/no-implicit-button-type · error · score 6.9 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Some elements in HTML has optional end tags. When an optional tag is omitted a browser must handle it as if the end tag was present.

html-validate/no-implicit-close · error · score 8.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

<input> is missing recommended type attribute

html-validate/no-implicit-input-type · error · score 6.9 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Inline style is not allowed.

html-validate/no-inline-style · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/no-missing-references

html-validate/no-missing-references · error · score 9.2 · page

Off by default; a group that runs html-validate, html-validate:document turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Only a single visible <main> element can be present at in a document at a time.

html-validate/no-multiple-main · error · score 6.7 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Some characters such as < and & hold special meaning in HTML and must be escaped using a character reference (HTML entity).

html-validate/no-raw-characters · error · score 6.6 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

aria-label is redundant when an associated <label> element containing the same text exists.

html-validate/no-redundant-aria-label · error · score 6.9 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

When the <label> element wraps the labelable control the for attribute is redundant and better left out.

html-validate/no-redundant-for · error · score 6.9 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/no-redundant-role

html-validate/no-redundant-role · error · score 6.9 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Self-closing elements are disallowed. Use regular end tag <undefined></undefined> instead of self-closing <undefined/>.

html-validate/no-self-closing · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Lines with trailing whitespace cause unnessecary diff when using version control and usually serve no special purpose in HTML.

html-validate/no-trailing-whitespace · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/no-unused-disable

html-validate/no-unused-disable · error · score 6.6 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

This file is saved with the UTF-8 byte order mark (BOM) present. It is neither required or recommended to use.

html-validate/no-utf8-bom · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/prefer-button

html-validate/prefer-button · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/prefer-native-element

html-validate/prefer-native-element · error · score 7.0 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

While <tbody> is optional is relays semantic information about its contents. Where applicable it should also be combined with <thead> and <tfoot>.

html-validate/prefer-tbody · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/presentation-role-style

html-validate/presentation-role-style · error · score 8.0 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Subresource Integrity (SRI) integrity attribute is required to prevent tampering or manipulation from Content Delivery Networks (CDN), rouge proxies, malicious entities, etc.

html-validate/require-sri · error · score 6.7 · page

Off by default; a group that runs html-validate, html-validate:document turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

The end tag for <script> is a hard requirement and must never be omitted even when using the src attribute.

html-validate/script-element · error · score 6.7 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

While valid the HTML5 standard encourages authors to omit the type element for JavaScript resources.

html-validate/script-type · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/tel-non-breaking

html-validate/tel-non-breaking · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/text-content

html-validate/text-content · error · score 7.1 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

When the same type of landmark is present more than once in the same document each must be uniquely identifiable with a non-empty and unique name.

html-validate/unique-landmark · error · score 7.0 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/unrecognized-char-ref

html-validate/unrecognized-char-ref · error · score 6.6 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/valid-autocomplete

html-validate/valid-autocomplete · error · score 7.2 · page

Off by default; a group that runs html-validate, html-validate:a11y, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

The <label> for attribute must reference a labelable form control.

html-validate/valid-for · error · score 6.8 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/valid-id

html-validate/valid-id · error · score 6.8 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

HTML void elements cannot have any content and must not have content or end tag.

html-validate/void-content · error · score 8.1 · page

Off by default; a group that runs html-validate, html-validate:standard turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/void-style

html-validate/void-style · error · score 6.6 · page

Off by default; a group that runs html-validate turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

html-validate/wcag

WCAG 2.1 requires each <a href> anchor link to have a text describing the purpose of the link using either plain text or an <img> with the alt attribute set.

html-validate/wcag/h30 · error · score 6.9 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

WCAG 2.1 requires each <form> element to have at least one submit button.

html-validate/wcag/h32 · error · score 6.8 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

WCAG 2.1 requires all images used as submit buttons to have a non-empty textual description using the alt attribute.

html-validate/wcag/h36 · error · score 6.8 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

Both HTML5 and WCAG 2.0 requires images to have a alternative text for each image.

html-validate/wcag/h37 · error · score 6.9 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

H63: Using the scope attribute to associate header cells and data cells in data tables

html-validate/wcag/h63 · error · score 6.8 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

A decorative image cannot have a title attribute. Either remove title or add a descriptive alt text.

html-validate/wcag/h67 · error · score 6.8 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages

H71: Providing a description for groups of form controls using fieldset and legend elements

html-validate/wcag/h71 · error · score 6.8 · page

Off by default; a group that runs html-validate, html-validate:a11y turns it on.

References

For rule authors

Reads

  • htmlvalidate.messages