AMP · AMP page

AMP page has validation errors

This AMP page's inline CSS uses !important, which AMP forbids. That single validation error means search engines will not serve it as AMP.

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. Its style amp-custom block ends with this rule:

.lede { font-style: normal !important; }

AMP does not allow !important in author CSS. Everything else on the page is valid AMP.

Why it matters

AMP pages must pass the AMP validator to be served from the AMP cache and shown with AMP features. A page with even one error is treated as an ordinary page, and Search Console lists it as invalid.

CSS is a common source of errors, because AMP limits the stylesheet to 75 KB and bans some rules such as !important.

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.

How to fix it

Fix each error the validator lists, here by removing !important and raising the selector’s specificity if needed. Google stopped requiring AMP for Top Stories in 2021, so many sites no longer need AMP at all. Add the validator to your build so errors are caught before release.

Back to all tests