AMP · AMP page
AMP page missing or invalid doctype
This AMP page has no <!doctype html> declaration at the top. AMP requires it, and without it browsers render the page in quirks mode.
How this page is built
This page is an AMP page. Its canonical points at a non-AMP version, which names this page in a rel=amphtml link. The page source starts with the html element. There is no doctype before it. Everything else on the page is valid AMP.
Without a doctype, browsers switch to quirks mode, which changes some layout rules.
Why it matters
Every AMP page must start with <!doctype html>. Without it the page fails AMP validation and is not served as AMP. Browsers also use quirks mode, an old rendering mode that can change how boxes, tables and line heights behave, so the page may look different from the design.
How to check it
Run the page through the AMP validator (the AMP Test in Search Console, the validator at validator.ampproject.org or the amphtml-validator package), or add #development=1 to the URL and open the browser console. Crawl tools that check AMP report validation errors per page. You can also view the source and check that the first line is <!doctype html>.
How to fix it
Add <!doctype html> as the first line of the page template. Google stopped requiring AMP for Top Stories in 2021, so many sites no longer need AMP at all.