Technical
TechnicalLow

HTML Doctype

Checks for <!DOCTYPE html> at the start of the document.

What this check measures

We verify the response starts with `<!DOCTYPE html>` (case-insensitive). Missing doctype triggers quirks mode in browsers — unpredictable rendering.

Why it matters

Quirks mode disables modern CSS, triggers wrong box model calculations, breaks layouts. Every modern framework ships doctype — missing one is usually a sign of hand-written template problems.

search

How our audit detects it

Read first 100 bytes of HTML response, check for doctype declaration.

Typical findings

  • error_outlineHTML starts with `<html>` directly — quirks mode.
  • error_outlineOld doctype (HTML 4 strict) — legacy code.

How to fix

Ensure every HTML response starts with `<!DOCTYPE html>` (HTML5). Frameworks do this automatically; manual templates need it explicit.

Frequently asked questions

Any doctype or HTML5?expand_more
HTML5 (`<!DOCTYPE html>`) only — legacy doctypes trigger partial quirks modes.

Want this checked on your site?

Pantra runs the full audit (SEO, Security, GEO, Performance, Schema, Technical, Images) in 10 seconds and generates stack-specific fix prompts.

Scan my site

Related checks