In short
Every page should start with <!DOCTYPE html>. Without it, browsers switch to quirks mode, emulating very old browsers, and layouts can differ. Add it as the first line of your base template, with nothing (not even PHP warnings) printed before it. The Semrush "Doctype not declared" article in this blog covers the same fix.
In passed form: "Page has the HTML doctype."
This guide isn't affiliated with or endorsed by Google.
Related issues
Sources and references
Chrome for Developers, Page lacks the HTML doctype
MDN, Quirks mode

About the author
Nazmul Nikhil
Head of SEO & Assistant Manager, Digital Marketing at Notionhive
SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.



