Mobile app version of vmapp.org
Login or Join
Carla537

: Correct usage of schema.org for logo? Google gives this example to markup your logo: <div itemscope itemtype="http://schema.org/Organization"> <a itemprop="url" href="http://www.example.com/">Home</a>

@Carla537

Posted in: #Html #Microdata

Google gives this example to markup your logo:

<div itemscope itemtype="http://schema.org/Organization">
<a itemprop="url" href="http://www.example.com/">Home</a>
<img itemprop="logo" src="http://www.example.com/logo.png" />
</div>

googlewebmastercentral.blogspot.ca/2013/05/using-schemaorg-markup-for-organization.html
But that example has the img outside the anchor, I want to put it inside...so I'm wondering can I do it this way instead:

<a itemscope itemtype="http://schema.org/Organization" href="http://www.example.com/">
<img itemprop="logo" src="http://www.example.com/logo.png" />
</a>


Is this valid? Note: I took out the URL itemprop.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Carla537

2 Comments

Sorted by latest first Latest Oldest Best

 

@Kaufman445

This should work because it still uses the logo and URL itemprops within the itemscope of 'Organisation' which is ultimately the markup it is looking for.

<div itemscope itemtype="http://schema.org/Organization">
<a itemprop="url" href="http://www.example.com/">
<img itemprop="logo" src="http://www.example.com/logo.png" />
</a>
</div>


I'd expect this to work if you ran it through Google's rich snippet testing tool to confirm.

10% popularity Vote Up Vote Down


 

@Cugini213

I advise you to use the code proposed by Google and it works.

<div itemscope itemtype="http://schema.org/Organization">
<a itemprop="url" href="http://www.example.com/">Home</a>
<img itemprop="logo" src="http://www.example.com/logo.png" />
</div>


The main reason is that the code is well structured and the scope is clear around the links and the related image. I'm not completely sure if the second code you proposed will work. I think no.

itemprop="logo" property defines the logo URL using the URL related the value of src.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme