Skip to content Skip to sidebar Skip to footer

Itemscope And Itemprop At Same Level

I have a link that looks like this: I'd like to put it

Solution 1:

You can have itemprop and itemscope on the same element, but it will mean something different.

In this example, a Product item has the url property:

<divitemscopeitemtype="http://schema.org/Product"><ahref="//href"itemprop="url"></a></div>

In this example, some other item has the url property, and its value is a Product item:

<ahref="//href"itemprop="url"itemscopeitemtype="http://schema.org/Product"></a>

(Note for the the latter case: the url value is the Product item, not the URL in the href attribute! So this probably doesn’t make sense for the url property.)

Solution 2:

No you don't need another wrapper to do that. You can specify itemprop="url" to the a tag.

This technique called "nested scope"

More about this is available at section 2.2 The basic syntax of this link http://www.w3.org/TR/2011/WD-microdata-20110525/

Post a Comment for "Itemscope And Itemprop At Same Level"