Search code examples
htmlschema.orgsemantic-markupmicrodata

Is it a mistake to repeat Microdata markup?


If i have a box under the header where I have Microdata for my social profiles and I have another same box in the footer, in this box can I repeat the markup:

<span itemscope itemtype="http://schema.org/Organization">   
 <link itemprop="url" href="http://www.your-company-site.com">
 <a itemprop="sameAs" href="http://www.facebook.com/your-company">FB</a>  
 <a itemprop="sameAs" href="http://www.twitter.com/YourCompany">Twitter</a>
</span>

or is it a mistake? Or must I add it only once?


Solution

  • It’s not forbidden, but it doesn’t make sense to do it, and it can lead to problems.

    Consumers interested in your Microdata parse your HTML document and extract the Microdata items. If they extract two Organization items, the first assumption is that these two items represent different organizations (unless they have the same itemid value).

    In your case, the two items have the same properties+values, and if two items have for example the same url value, it’s likely that they are about the same thing, but that’s something that the consumer would have to assess, which can lead to errors. And in cases where no property is used that typically has a "unique" value (like url or telephone), it’s not easy and sometimes even impossible to decide if they are the same or not (for example, two different organizations could have the same name).

    So ideally only mark up one occurrence per page. If you mark up the occurrence in the header, but the footer contains additional content which you want to add, you could use the itemref attribute.