An example of the code for implementing the Aggregate Rating Schema for a Product in Google
<div itemscope itemtype="http://schema.org/Product">
<h1 >Product Name</h1>
<img src="/product-image.jpg" alt="Product Image">
<div >
<span >4.5</span> out of
<span >5</span> based on
<span itemprop="ratingCount">25</span> ratings.
</div>
</div>
In this example, we have a Product with a name and an image, and an Aggregate Rating section that includes the rating value (4.5), the best possible rating value (5), and the number of ratings (25). Note that the itemscope
and itemtype
attributes are used to define the type of schema being used, and the itemprop
attribute is used to specify which property each element represents.
Here's an example of the code for implementing the Review Aggregate Rating Schema in Google:
<div itemscope itemtype="http://schema.org/Product">
<h1 >Product Name</h1>
<img src="/product-image.jpg" alt="Product Image">
<div itemprop="review" itemscope itemtype="http://schema.org/Review">
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<span >4.5</span> out of
<span >5</span> based on
<span itemprop="ratingCount">25</span> reviews.
</div>
</div>
</div>
In this example, we have a Product with a name and an image, and a Review Aggregate Rating section that includes the rating value (4.5), the best possible rating value (5), and the number of reviews (25). Note that the itemscope
and itemtype
attributes are used to define the type of schema being used, and the itemprop
attribute is used to specify which property each element represents.