加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

html – 如何确定具有微数据的锚标记的值?

发布时间:2020-12-14 23:19:41 所属栏目:资源 来源:网络整理
导读:Google和其他人如何确定Anchor标记上的itemprop值? 在上面的例子中,itemprop的值是href属性,就像解析链接标记的方式一样?或者是innerHTML的值,作为标准块元素被解析? 我搜索了很多,但找不到答案.我对所有答案持开放态度,但我非常喜欢给出答案的来源,所以

Google和其他人如何确定Anchor标记上的itemprop值?

 

在上面的例子中,itemprop的值是href属性,就像解析链接标记的方式一样?或者是innerHTML的值,作为标准块元素被解析?

我搜索了很多,但找不到答案.我对所有答案持开放态度,但我非常喜欢给出答案的来源,所以我可以进一步调查.

提前致谢!

最佳答案
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.

例外:当a / area / link元素具有itemscope属性时,则itemprop“value是元素创建的项”,而不是href值.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读