Mobile app version of vmapp.org
Login or Join
Welton855

: How can you have a hotel to have a Schema.org rating based on the hotel star rating system? How would you write microdata for hotels with ratings classified as "1-star" to "5-star" hotels?

@Welton855

Posted in: #Html #Microdata #RichSnippets #SchemaOrg #Seo

How would you write microdata for hotels with ratings classified as "1-star" to "5-star" hotels? Looking at schema.org/Hotel, I see no "Rating" property but only an "aggregateRating" one which is for multiple ratings from reviews. For reference, here's an explanation of the Star Rating system www.hotels.com/customer_care/star_rating.html
Here' s an example of my markup code:

<div class="container mt30" itemscope itemtype="http://schema.org/Product">
<div class="row">
<div class="col-sm-7" itemprop="brand" itemscope itemtype="http://schema.org/Hotel">
<span style="font-size:24px" itemprop="name">Hotel Name</span>

<span class="hidden" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">3.5</span>
<span itemprop="worstRating">1</span>
<span itemprop="bestRating">5</span>
<span itemprop="ratingCount">1</span>
</span>
...


I'm guessing I would need something like this:

<span class="hidden" itemprop="rating" itemscope itemtype="http://schema.org/Rating">
<span itemprop="ratingValue">3.5</span>
<span itemprop="worstRating">1</span>
<span itemprop="bestRating">5</span>
</span>


However, it seems that code would be invalid microdata. Any help would be appreciated.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Welton855

2 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

Types and properties for hotels are proposed and will likely be part of the next Schema.org release (2.3).

In this proposal, Hotel¹ can have the property starRating¹:


An official rating for the lodging business, e.g. from national associations or standards bodies. Use the name property of a PropertyValue for indicating the type of the rating (e.g. HOTREC, DEHOGA, WHR, or Hotelstars).


You can see some more documentation about it under the "Star Rating" section.



¹ Don’t use this URI for your data, it’s just a snapshot of the current proposal, used for review, discussion etc. Related issue: Stars for Hotel/LodgingBusiness

10% popularity Vote Up Vote Down


 

@Megan663

Traditional hotel star ratings are not based on reviews and would not be appropriate to use the aggregateRating. Instead the stars are an award and if you wish to represent them in schema.org you should do it like this:

Rated <span itemprop="award">★★★★☆</span> by the Hotelstars Union.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme