Start here
Before You Fix It: What This Check Means
Doctype determines document parsing mode and can influence layout/compatibility behavior. In plain terms, this checks whether the page starts with the standard HTML5 doctype so browsers render it predictably. Scavo inspects the page source for doctype declaration patterns.
Why this matters in practice: operational drift here often causes hard-to-debug regressions across environments.
How to use this result: treat this as directional evidence, not final truth. This result reflects what was observable at scan time and should be verified in your own production context. First, confirm the issue in live output: verify directly in live production output with browser/network tools Then ship one controlled change: Place `<!DOCTYPE html>` at the top of shared layout templates. Finally, re-scan the same URL to confirm the result improves.
Background sources
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 (plain English)
Scavo inspects the page source for doctype declaration patterns.
Current logic:
Pass:<!DOCTYPE html>foundWarning: some doctype exists, but not HTML5 doctypeFail: 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
- Ask your developer to check live source on a few key templates.
- Confirm every template starts from the same shared base layout.
- Request before/after source evidence.
- 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
- Place
<!DOCTYPE html>at the top of shared layout templates. - Remove legacy XHTML/HTML4 doctypes from old partials.
- Ensure no server-side output appears before doctype.
- 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.