我有一个看起来像这样的链接:
<a href="//href" itemscope itemtype="http://schema.org/Product">
<img src="src" itemprop="image">
</a>
我想放itemprop="url"
in the <a>
标签,但它包含itemscope
对于该产品。我可以把它放在同一水平吗itemtype=
?
或者,我是否需要将整个内容包装在 div 中才能使其工作,或者使用<meta>
标签为itemprop="url"
微观数据?谢谢!
You can have itemprop
and itemscope
在同一个元素上,但它会意味着不同的东西。
在这个例子中,一个Product项目有url
财产:
<div itemscope itemtype="http://schema.org/Product">
<a href="//href" itemprop="url">…</a>
</div>
在此示例中,其他一些项目具有url
属性,其值是Product item:
<a href="//href" itemprop="url" itemscope itemtype="http://schema.org/Product">…</a>
(注意后一种情况:url值是Product item,而不是中的 URLhref
属性!所以这对于url
财产。)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)