Reputation: 1
I'm trying to add structured data snippets. But it is showing some errors in W3C validation. Website address: www.truewayfze.com
Error Line 14, Column 73: Element link is missing required attribute href.
<link itemprop="image" content="http://www.truewayfze.com/img/logo.png"/>
Error Line 16, Column 83: Element link is missing required attribute href.
…k property="og:image" content="http://www.truewayfze.com/img/products/2.jpg" />
Error Line 14, Column 73: The itemprop attribute was specified, but the element is not a property of any item.
<link itemprop="image" content="http://www.truewayfze.com/img/logo.png"/>
Upvotes: 0
Views: 930
Reputation: 96587
Your first error:
The link
element can’t have a content
attribute in HTML5+Microdata. You probably want to use the href
attribute instead:
<link itemprop="image" href="http://www.truewayfze.com/img/logo.png" />
Your second error:
The link
element could have a content
attribute in HTML5+RDFa, but href
is still required, and using content
wouldn’t make sense in the first place for specifying a URI. So it should probably be:
<link property="og:image" href="http://www.truewayfze.com/img/products/2.jpg" />
Your third error:
It means that you are using this link
element without an itemscope
parent. It’s a Microdata property that doesn’t "belong" anywhere. Either add a suitable parent, or use the itemref
attribute to add it to such a parent.
Upvotes: 2