HTML Doctype Missing — Browser Rendering in Quirks Mode

Without <!DOCTYPE html> at the top of your HTML, browsers enter "quirks mode" — applying legacy rendering rules from the IE5 era that break modern CSS features like box-sizing, flexbox behaviour, and font rendering. This causes layouts to look different across browsers and makes debugging CSS issues significantly harder.

HTML Doctype Missing — Browser Rendering in Quirks Mode featured image

Start here

Before you fix it: what this check means

Scavo checks for the HTML doctype declaration that tells browsers to use standard page rendering. Scavo inspects the page source for doctype declaration patterns.

Why this matters in practice: checking the reported setting helps you keep the site working as intended.

Use this as evidence, not a final verdict. This result covers what the scan could observe at that time, not every page or visitor situation. Check the live site first. Open the published page and ask your developer to inspect the reported request or setting Make one controlled change. Place `<!DOCTYPE html>` at the top of shared layout templates. Re-scan the same URL and compare the finding; check the feature yourself as well.

TL;DR: Your HTML lacks a doctype declaration, causing browsers to render in quirks mode with inconsistent layout behaviour.

Without <!DOCTYPE html> at the top of your HTML, browsers enter "quirks mode" — applying legacy rendering rules from the IE5 era that break modern CSS features like box-sizing, flexbox behaviour, and font rendering. This causes layouts to look different across browsers and makes debugging CSS issues significantly harder.

What Scavo checks (quick version)

Scavo inspects the page source for doctype declaration patterns.

Current logic:

  • Pass: <!DOCTYPE html> found
  • Warning: some doctype exists, but not HTML5 doctype
  • Fail: no doctype declaration found

How Scavo scores this check

Scavo assigns one result state for this check on the tested page:

  • Pass: baseline signals for this check were found.
  • Warning: partial coverage or risk signals were found and should be reviewed.
  • Fail: required signals were missing or risky behavior was confirmed.
  • Info: Scavo could not gather enough reliable evidence on this run to score pass/fail confidently.

In your scan report, this appears under What failed / What needs attention / What is working for doctype, followed by Recommended next steps and Technical evidence (for developers) when needed.

  • Scan key: doctype
  • Category: TECHNICAL

Why fixing this matters

Missing/legacy doctypes can push browsers into quirks mode, causing hard-to-debug rendering differences across devices and engines.

On production teams, this often appears as "random CSS bugs" that are actually document-mode issues.

If you are not technical

  1. Ask your developer to check live source on a few key templates.
  2. Confirm every template starts from the same shared base layout.
  3. Request before/after source evidence.
  4. Re-run Scavo and confirm pass.

Technical handoff message

Copy and share this with your developer.

Scavo flagged HTML doctype (doctype). Please ensure rendered pages start with HTML5 doctype (<!DOCTYPE html>) and remove legacy/missing doctype paths in shared templates.

If you are technical

  1. Place <!DOCTYPE html> at the top of shared layout templates.
  2. Remove legacy XHTML/HTML4 doctypes from old partials.
  3. Ensure no server-side output appears before doctype.
  4. Validate representative route groups, not just homepage.

How to verify

  • View-source confirms <!DOCTYPE html> at document start.
  • Browser devtools reports standards mode.
  • Re-run Scavo and verify check passes.

What this scan cannot confirm

  • It does not validate complete HTML semantics.
  • It does not detect every cross-browser CSS/JS issue.
  • It does not audit unpublished or inaccessible template routes.

Owner checklist

  • [ ] Assign owner for shared document shell/template.
  • [ ] Keep one canonical base layout for doctype output.
  • [ ] Add template smoke tests for source preamble.
  • [ ] Re-test after rendering-engine upgrades.

FAQ

Can pages still look okay without HTML5 doctype?

Sometimes, but behavior becomes less predictable across browsers and edge cases.

Is capitalization important?

Scavo matches doctype case-insensitively; missing/legacy declarations are the typical problem.

Should doctype appear before <html>?

Yes, it should be the first declaration in the document.

Is this worth fixing if only one legacy page fails?

Yes. Legacy templates often spread via reuse and can cause intermittent UI regressions.

Sources


Need help tracing which template path emits legacy doctype? Send support your layout stack.

More checks in this area

404 Page Returns Wrong HTTP Status Code featured image
not_found_status

404 Page Returns Wrong HTTP Status Code

When a deleted or broken URL returns HTTP 200, search engines index it as a real page — polluting your index with dead content and wasting crawl budget. This is called a "soft 404" and Google specifically warns against it. Your 404 page should return a proper 404 status code while still showing a helpful message to users.

Open guide
Analytics Not Installed or Not Firing featured image
analytics_instrumentation

Analytics Not Installed or Not Firing

Without analytics, every business decision about your website becomes a guess. You can't see which pages convert, where users drop off, which channels drive traffic, or whether changes improve performance. This is the foundation of data-driven optimization — if it's missing, you're flying blind.

Open guide