: 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>
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.
More posts by @Carla537
2 Comments
Sorted by latest first Latest Oldest Best
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.
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.