Code for a Review Snippet for Product
Mark
Here's an example of the code for implementing a Review Snippet in Google:
<div itemscope itemtype="http://schema.org/Review">
<div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product">
<h1 >Product Name</h1>
<img src="/product-image.jpg" alt="Product Image">
</div>
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<span >4.5</span> out of
<span >5</span>
</div>
<div >
<span >Reviewer Name</span>
</div>
<div itemprop="reviewBody">
This product is great. I've been using it for a month and it has exceeded my expectations.
</div>
<div >2022-03-01</div>
</div>
In this example, we have a Review for a Product with a name and an image, a rating value (4.5) and the author's name, review body and date published. 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.