I am adding Microdata on a site, and wondering on which level the itemprop
property should appear.
For example, I have the following markup:
<div itemscope itemtype="http://schema.org/Article">
<div class="author">
<a href="http://www.author.com">Author's Name</a>
</div>
</div>
Where should itemprop
go, in the a
element directly or it is possible to add it to <div class="author">
and it would be parsed correctly?
Can I have the following:
<div itemscope itemtype="http://schema.org/Article">
<div class="author" itemprop="author">
<a href="http://www.author.com">Author's Name</a>
</div>
</div>
instead of
<div itemscope itemtype="http://schema.org/Article">
<div class="author">
<a href="http://www.author.com" itemprop="author">Author's Name</a>
</div>
</div>
In other words, does the itemprop
property have to be defined on the element directly (such as an a
or img
tag) or it's possible to define it on a wrapper div
with the content actually being in a child element?