官术网_书友最值得收藏!

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 of the error

We can use this information to pinpoint in the AMP-HTML markup where the error occurred.

Although it looks like we have a lot of errors, most of these are related to the required boilerplate we saw in the last chapter, so we know how to fix them already.

主站蜘蛛池模板: 中江县| 西峡县| 平塘县| 阳城县| 灌阳县| 康平县| 长葛市| 南木林县| 望奎县| 开江县| 大庆市| 土默特左旗| 米脂县| 洮南市| 巫溪县| 靖州| 任丘市| 梁山县| 郓城县| 南昌市| 景德镇市| 武夷山市| 阿城市| 山阴县| 和硕县| 治多县| 新密市| 饶河县| 红原县| 浦县| 巴彦县| 龙陵县| 江陵县| 安远县| 合作市| 兰西县| 汨罗市| 定襄县| 北流市| 广灵县| 区。|