【发布时间】:2012-04-13 17:08:06
【问题描述】:
我最近将我的网站从 xhtml 过渡到 html5。特别是这样我就可以使用有效的块级锚标签。 <a><div /></a>.
运行验证时遇到以下错误:
元素链接上属性 rel 的错误值发布者:关键字 发布者未注册。
但是根据这个页面,这正是我应该做的。
https://developers.google.com/+/plugins/badge/#connect
我的代码:
<link href="https://plus.google.com/xxxxxxxxxxxxxxxx" rel="publisher" />
<a href="https://plus.google.com/xxxxxxxxxxxxxxx?prsrc=3" style="text-decoration:none;">
<img src="https://ssl.gstatic.com/images/icons/gplus-16.png" alt="" style="border:0;width:16px;height:16px;"/>
</a>
我不知道如何以符合 html5 的方式实现这一点。有人可以帮忙吗?
【问题讨论】:
-
你最好去 StackOverflow,因为这是一个编程问题而不是网站管理员问题。
-
@Christopher - 实际上我是故意选择 WM 的,因为它似乎是网站管理员熟悉的东西。如果我错了,我会很感激转会的标志。我在这里的代表太少了。
-
我认为没有任何整洁的解决方案。 publisher has been dropped 和谷歌代码仍然需要它。我会忽略来自 (validator.nu?) 的错误,并密切关注谷歌文档,看看他们是否更新代码以使用有效的
rel值(或切换到其他类似data-publisher的值)。跨度>
标签: html google-plus-one