Require a doctype for the document

Rule ID:
missing-doctype
Category:
Document
Standards:
  • HTML5

Requires that the document contains a doctype.

Rule details

Examples of incorrect code for this rule:

<html>
    <body>...</body>
</html>
error: Document is missing doctype (missing-doctype) at inline:1:1:
> 1 | <html>
    | ^
  2 |     <body>...</body>
  3 | </html>


1 error found.

Examples of correct code for this rule:

<!doctype html>
<html>
    <body>...</body>
</html>