简体   繁体   English

W3验证错误

[英]W3 Validation errors

I am validating against html5 and I know that the validator is not 100% but it even shows it should allow this in it's suggestion... 我正在针对html5进行验证,我知道验证器不是100%,但它甚至表明它应该在建议中允许这样做...

Ouptut: 输出:

Line 75, Column 92: Bad value home for attribute rel on element a: Keyword home is not registered. 第75行,第92列:元素a上属性rel的错误值home,未注册关键字home。

 …bomb/" rel="home" title="beefbomb.com"><img src="http://localhost/local_folder… 

It then tells me to take a look at the microformats wiki... http://microformats.org/wiki/existing-rel-values#HTML5_link_type_extensions 然后告诉我看一下微格式Wiki ... http://microformats.org/wiki/existing-rel-values#HTML5_link_type_extensions

Which defines: 定义:

Keyword: home 关键字:主页

Effect on a, area: Hyperlink 对区域的影响:超链接

Brief description: …indicates that the [referenced document] is the homepage of the site in which the current page appears. 简要说明: …表示[参考文档]是当前页面所在站点的主页。 can be combined with 'alternate' to indicate for example a feed for the site of the current page. 可以与“替代”结合使用,以表示例如当前页面站点的供稿。

Link to specification: rel-home 链接到规格: rel-home

Why could this be? 为什么会这样呢?

Microformats aren't part of the official spec. 微格式不是官方规格的一部分。 A future ua could come along that decides to treat links with rel="home" on them as links to go to the homescreen of the device for instance, without going against the spec. 将来的UA可能会决定将其上带有rel =“ home”的链接视为链接到设备主屏幕的链接,而不违反规范。

The warning is to ask you, "Have you done this for a reason, or by mistake?". 警告是要问您:“您是否出于某种原因或错误地这样做了?”。 If you know what you are doing and why, it's fine. 如果您知道自己在做什么以及为什么,那就很好。 If you decided to make up a new rel attribute for your own reasons, you get told that it's not in spec, but that a system already exists that uses it. 如果您出于自己的原因决定组成一个新的rel属性,则会被告知该属性不在规格范围内,但是已经存在使用该属性的系统。

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

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