HTML Doctype Is Missing
| Field | Value |
|---|---|
| Rule code | Html_DocType_Missing |
| WCAG conformance level | A |
| WCAG success criterion | 4.1.1 Parsing |
| Must be fixed at source | Yes |
Description
The structural markup of an HTML page should begin with a valid Doctype (document type) tag, such as the HTML5 Doctype declaration !DOCTYPE html. When a document type is not specified, assistive tools cannot infer the document type; this may lead to unexpected changes in layout or how assistive tools read the page.
How to fix
Add a doctype declaration to the beginning of the page. Place the doctype before the opening <html> tag.
<!DOCTYPE html><html lang="en">