Due to the streamlined nature of AMP code, many errors that may work in a regular html page will cause validation errors in an AMP page that will prevent your page from getting cached and shown as an AMP page by Google.
The list below contains the most common errors that cause validation errors. Most of these are linked to code that has been added in custom html.
- amp-form *
- <style amp-custom></style>
- <meta charset="utf-8">
- <link rel="stylesheet">
All tags with an asterisk * are added automatically only if you add a form, lightbox URL link, or a video from the listed sites. If you are manually adding any of these items using custom html code, you will need to include the complementary amp script as it will not be automatically included.
For more information, check out Google's AMP validator error documentation.