[英]Validation error “Bad value apple-touch-icon-precomposed for attribute rel on element link: Keyword apple-touch-icon-precomposed is not registered.”
[英]Validation: Bad value first for attribute rel on element link
我正在使用Piwigo照片画廊软件,它会在页面顶部动态生成一些代码,如下所示:
<link rel="first" title="First" href="picture.php?/2601/category/37">
<link rel="prev" title="Previous" href="picture.php?/2619/category/37">
<link rel="next" title="Next" href="picture.php?/2621/category/37">
<link rel="last" title="Last" href="picture.php?/2760/category/37">
<link rel="up" title="Thumbnails" href="index.php?/category/37">
通过验证器运行它时,出现以下错误:
Line 21, Column 71: Bad value first for attribute rel on element link: The string first is not a registered keyword or absolute URL.
…" href="picture.php?/2601/category/37"> <link rel="prev" title="Previous" hre…
Line 21, Column 282: Bad value last for attribute rel on element link: The string last is not a registered keyword or absolute URL.
…" href="picture.php?/2760/category/37"> <link rel="up" title="Thumbnails" hre…
Line 21, Column 348: Bad value up for attribute rel on element link: The string up is not a registered keyword or absolute URL.
…category/37"> <link rel="up" title="Thumbnails" href="index.php?/category/37">
经过一番阅读后,我了解到HTML5保留了上一个和下一个,尽管它删除了rel和up。 我不明白的是,首先要替换的是什么? 如果我将其完全删除,验证器对此也不满意。
有人知道吗? 谢谢。 :)
在HTML5中,只允许将以下值用于rel
属性:
如果您需要其他链接类型,则必须进行注册 。
关于first
/ index
的删除: rel = first和rel = index的语义违反了规范和实现 。
使用临时模板w3c并在图库页面上找到rel =“ title”,这导致val失败从脚本中删除了它,但我不知道它做了什么。在所有平台上测试网站后,属性值仍然不知道它在做什么相对=“标题”
验证器面临相同的问题(使用fancybox插件时)。 您可以将rel
替换为data-rel
并在脚本中进行适当的更改(即对于fancybox,我们需要将所有attr('rel')
替换为attr('data-rel')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.