Common AMP Validator Errors Related to Custom HTML/Javascripts/Stylesheets

Follow

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.

The following tags have already been added to your AMP page by the Unbounce bundle code. Re-adding the following tags through custom javascripts, stylesheets, or html will cause validator errors:

  • amp-analytics
  • amp-form *
  • amp-lightbox
  • amp-iframe*
  • amp-youtube*
  • amp-vimeo*
  • amp-wistia-player*
  • <style></style>
  • <style amp-custom></style>
  • <head></head>
  • <body></body>
  • <meta charset="utf-8">
  • <link rel="stylesheet">

 

Note:

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. 

Was this article helpful?
0 out of 0 found this helpful