Mobile app version of vmapp.org
Login or Join
Angie530

: Issue with result of Microdata schema.org in Google Labs Please note this code: <html itemscope itemtype="http://schema.org/WebPage"> <head> <meta itemprop="name" content="webpage"/>

@Angie530

Posted in: #Microdata

Please note this code:

<html itemscope itemtype="http://schema.org/WebPage">
<head>
<meta itemprop="name" content="webpage"/>
</head>

<body>
<div itemprop="mainContentOfPage" itemscope itemtype="http://schema.org/Article">
<span itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="4">
<meta itemprop="worstRating" content="0">
<meta itemprop="bestRating" content="5">
<meta itemprop="ratingCount" content="100">
</span>
</div>
</body>
</html>


If I add an AggregateRating inside the div tag for article, Google Labs does not show the values of AggregateRating on its URL result So I must remove itemprop="mainContentOfPage" or add AggregateRating out of the div tag or add both.

How can I fix this problem?

AggregateRating belongs to AggregateRating, not WebPage!?

For a solution I changed the code to this:

<html itemscope itemtype="http://schema.org/WebPage">
<head>
<meta itemprop="name" content="webpage"/>
</head>

<body>
<span itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="4">
<meta itemprop="worstRating" content="0">
<meta itemprop="bestRating" content="5">
<meta itemprop="ratingCount" content="100">
</span>

<div itemprop="about mainContentOfPage" itemscope itemtype="http://schema.org/Article">
<span itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="4">
<meta itemprop="worstRating" content="0">
<meta itemprop="bestRating" content="5">
<meta itemprop="ratingCount" content="100">
</span>
</div>
</body>
</html>


But I'm not sure it's true or not!

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Angie530

1 Comments

Sorted by latest first Latest Oldest Best

 

@Jamie184

Okay. I understand that the schema.org markup is confusing and I am hardly an expert.

I removed a few items that did not make sense to me and changed your meta statements to spans. I noticed in answering a previous question that the meta statements do not work. I recommend using span instead.

<html>
<head>
</head>

<body>
<div itemprop="mainContentOfPage" itemscope itemtype="http://schema.org/Article">
<span itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">4</span>
<span itemprop="worstRating">0</span>
<span itemprop="bestRating">5</span>
<span itemprop="ratingCount">100</span>
</span>
</div>
</body>
</html>


The above code works in the Google Rich Snippets Tool okay.

The AggregateRating could optionally be followed by Review to list some or all of the reviews if you want.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme