Fixing AMP validation errors

To keep things simple, we'll use the developer console validator for most of this book because it works without having to install anything. This makes it the easiest approach to get started with.

If you haven't already activated the AMP validator, then do it now by adding the fragment #development=1 to the end of your URL and reload the page with the developer tools console open. Your URL will be something like this:

https://theampbook.com/ch2/news.amp.html#development=1

You should see a list of errors similar to those in the previous images. Each validation error includes three important pieces of information:

  • The filename in which the error occurred
  • The line number and character number of the error
  • A description ...

Get AMP: Building Accelerated Mobile Pages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.