简体   繁体   English

如何修复 HTML 验证错误 - 在 AMP 网站上

[英]How to fix HTML validation errors - on AMP website

I have created an AMP website - https://full-moon-report.com/ It has no AMP errors but it has a lot of HTML errors when I check it in the HTML validator:我创建了一个 AMP 网站 - https://full-moon-report.com/它没有 AMP 错误,但是当我在 Z4C4AD5FCA2E7A3F74DBB1CED00381AA4 中检查它时,它有很多 HTML 错误:

https://validator.w3.org/nu/?doc=https%3A%2F%2Ffull-moon-report.com https://validator.w3.org/nu/?doc=https%3A%2F%2Ffull-moon-report.com

The errors are:错误是:

//this happens with both the "amp" or the lightning symbol. //这发生在“amp”或闪电符号上。

Error: Attribute amp not allowed on element html at this point.错误:此时元素 html 上不允许使用属性放大器。

Error: Attribute custom-element not allowed on element script at this point.错误:此时元素脚本上不允许使用属性自定义元素。 </scri </scri

Error: Attribute amp-custom not allowed on element style at this point.错误:此时元素样式上不允许使用 amp-custom 属性。

Error: Attribute amp-boilerplate not allowed on element style at this point.错误:此时元素样式上不允许使用 amp-boilerplate 属性。

Error: Attribute action-xhr not allowed on element form at this point.错误:此时元素表单上不允许使用属性 action-xhr。

Error: Attribute submit-success not allowed on element div at this point.错误:此时元素 div 上不允许属性提交成功。

Error: Bad value for attribute role on element textarea.错误:元素 textarea 上的属性角色值错误。

Warning: Attribute [hidden] is not serializable as XML 1.0.警告:属性 [hidden] 不可序列化为 XML 1.0。

↩ ↩ ↩ ↩ ↩ ↩

all of the errors are amp related.所有错误都与放大器有关。 What am I doing wrong please?请问我做错了什么?

You're trying to validate an AMP document as if it were HTML.您正在尝试验证 AMP 文档,就好像它是 HTML。

I'm not aware of any validation tool which supports AMP.我不知道有任何支持 AMP 的验证工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM