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
, orlink
element
The value is the absolute URL that results from resolving the value of the element'shref
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/