Doctype and the basics of a valid document
A missing doctype throws browsers into quirks mode with 1990s layout rules. Start every page with <!doctype html>.
Step by step, with screenshots: HTML validation errors: which ones matter and which are noise →
Check your own site
Runs this check and the other 186, free, in about 45 seconds.
What a passing site looks like
- Doctype is presentwarning · −1 ptseffort S
Doctype is missing
Why it matters. Without <!doctype html>, browsers render in quirks mode and layouts can differ between browsers.
- Put <!doctype html> as the very first line of the document.