Itemscope和itemprop在同一级别 [英] Itemscope and itemprop at same level
问题描述
我有一个如下所示的链接:
< a href =// hrefitemscope itemtype = http://schema.org/Product\">
< img src =srcitemprop =image>
< / a>
我想将 itemprop =url
< a> 标签中,但它包含该产品的 itemscope
。我可以把它放在与 itemtype =
?
相同的水平吗?或者,我是否需要将整个或者对 itemprop =url使用
微观数据? < meta>
标签
itemscope
在同一个元素上,但它会有不同的意思。 在这个例子中, Product 项目包含 url
属性:
< ; div itemscope itemtype =http://schema.org/Product>
< a href =// hrefitemprop =url> ...< / a>
< / div>
在这个例子中,其他一些项目包含 url
属性,它的值是一个 Product 项:
< a href =/ / hrefitemprop =urlitemscope itemtype =http://schema.org/Product> ...< / a>
(注意后一种情况: I have a link that looks like this: I'd like to put Or, do I either need to wrap the whole thing in a div to make it work, or use a You can have In this example, a Product item has the In this example, some other item has the (Note for the the latter case: the 这篇关于Itemscope和itemprop在同一级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! url
value是产品 a>,而不是 href
属性中的URL!所以这可能对 url
属性没有意义。 ) <a href="//href" itemscope itemtype="http://schema.org/Product">
<img src="src" itemprop="image">
</a>
itemprop="url"
in the <a>
tag, but it contains the itemscope
for that product. Can I put that at the same level as itemtype=
?<meta>
tag for the itemprop="url"
microdata? Thanks!itemprop
and itemscope
on the same element, but it will mean something different.url
property:<div itemscope itemtype="http://schema.org/Product">
<a href="//href" itemprop="url">…</a>
</div>
url
property, and its value is a Product item:<a href="//href" itemprop="url" itemscope itemtype="http://schema.org/Product">…</a>
url
value is the Product item, not the URL in the href
attribute! So this probably doesn’t make sense for the url
property.)