html - 如何确定带有微数据的 anchor 标签的值(value)?

标签 html seo microdata schema.org

Google 和其他公司如何确定 anchor 标记上 itemprop 的值?

 <a href="foo.html" itemprop="barprop">Name Of Link</a>

在上面的示例中,itemprop 的值是 href 属性,很像 link 标签的解析方式吗?还是 innerHTML 的值作为标准 block 元素被解析?

我搜索了很多,找不到答案。我对所有答案都持开放态度,但我非常希望找到所提供答案的来源,以便我可以进一步调查。

提前致谢!

最佳答案

Microdata 规范(现在只是 W3C Note)defines :

If the element is an a, area, or link element
The value is the absolute URL that results from resolving the value of the element's href attribute relative to the element at the time the attribute is set, or the empty string if there is no such attribute or if resolving it results in an error.

异常(exception):当 a/area/link 元素具有 itemscope 属性时,则 itemprop “值是由元素创建的项目”,而不是 href 值。

关于html - 如何确定带有微数据的 anchor 标签的值(value)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20255080/

相关文章:

javascript - 使用 Wordpress 的 AJAX 哈希 HREF

javascript - HTML5 输入类型文件错误处理

url - 在 url 上获取 ref=yfp

html - 我将哪些 HTML5 微数据用于工作(职位空缺)?

html - Schema.org 中的新闻项目

html - 在所有页面上使用两个线程打印表头

c# - mvc 3 Html.EditorFor 添加 html 属性不起作用

php - 索引规范版本页面的正确方法是什么?

dns - 如何告诉 Google 将结果更改为我的博客网站的新域?

html - 当前页面上的面包屑