How to Validate AMP HTML pages using NPM Tool?

In this tutorial, you'll learn how to install the validator, validate local amp pages and website URLs. You can understand the PASS or validation error results using command line.


Step 1 - Install AMP Validator

npm install -g amphtml-validator

Step 2 - Validate Local AMP Html Page

amphtml-validator index.html

if your AMP page is valid, You'll see "PASS"

PASS

if there is an error, the validator will show detailed error messages 

12:3 Usage of the !important CSS qualifier is not allowed.