# hReview Microformat

### Roger Costello

Click arrow key () to navigate to next page

# Reviews are Important

- Before purchasing a product I like to find out what other people think of it.
  - Before purchasing a book I check its reviews on amazon.com
  - Before hiring a company to paint my house I search the Web for opinions (reviews) of the company
  - Before going to see a movie I look at the movie reviews on movies.yahoo.com to see what other people think of the movie
- Reviews are important. They give us an indication of the likely quality and value of things, thereby facilitating (hopefully) better decisions.

# Purpose of the hReview Microformat

- The hReview Microformat enables Web tools to detect that a Web page contains a review (of a product, event, business, etc) and extract the pieces of the review, such as:
  - The item being reviewed
  - The review (description)
  - The rating (e.g., four stars out of five)

# Best of Breed

- The composite Microformats we examined earlier (hCard and hCalendar) are 1:1 mappings of preexisting specifications (vCard and vCalendar, respectively).
- hReview is different. It is not a 1:1 mapping of a specification. Rather, the Microformat community examined the various types of reviews that are used on the Web today and distilled the properties common to all reviews.

# hReview Properties

- dtreviewed: date/time the review was written.
- summary: a short synopsis of the review, the title of the review.
- reviewer: the hCard of the person who is doing the review.
- item: the thing (product, event, business, etc.) being reviewed. This property contains these subproperties (which all come from hCard):
  - fn: the formatted name of the thing being reviewed (e.g., if the thing being reviewed is a book, then fn is the book title; if the thing being reviewed is a movie then fn is the name of the movie).
  - url: the URL to the thing being reviewed (e.g., if the thing being reviewed is a company that paints houses, then url is the URL to their Web site).
  - photo: a URL to a photo of the thing being reviewed (e.g., if the thing being reviewed is a book, then photo is the URL to a photo of the book).

# hReview Properties (cont.)

- rating: a rating of the thing being reviewed. The default rating scale is 1.0 - 5.0, where 1.0 represents the lowest rating and 5.0 represents the highest rating. There are two optional subproperties - worst and best - for use when a different rating scale is desired.
- type: the kind of thing being reviewed. Legal values are:
  - product, event, business, person, place, website, url.
- description: the full text of the opinion of the reviewer.
- rel=tag: use the rel-tag Microformat to associate a tag with the thing being reviewed.

# hReview Properties (cont.)

- permalink: a permalink is a long-lived URL. If the review is embedded within a Web page that is continually being updated, a permalink is a permanent link to the review (the URL persists even if the review is moved off the Web page). Web tools that index reviews may use this property as a unique ID.
- rel=license: use the rel-license Microformat to associate a license with the review.
- version: use to indicate the version of the hReview specification being used. This tutorial is describing version 0.3

# Optional/Mandatory Properties

- The root classname is "hreview" and it is, of course, required.
- The formatted name (fn) subproperty of the item property is required (i.e., both item and fn are required).
- Everything else is optional.

# hReview Profile URL

- http://microformats.org/wiki/hreview-profile

# Example: Book Review

- Example: markup this HTML text using the hReview properties:

1. <body>
2. <h1>Review of <a href="http://www.amazon.com/...">An Introduction to Mathematics</a></h1>
3. <p><span class="stars">* * * * *</span> <span class="title">Insightful and Provocative</span>,
4. March 22, 2002</p>
5. <p>Reviewer: <a href="http://www.amazon.com/...">Michael Wischmeyer</a></p>
6. <p>"The study of mathematics is apt to commence in disappointment."</p>
7. ...
8. </body>

- View example01 (no hReview) in a browser.

# Revised Book Review (with hReview)

1. <div class="hreview">
2. <h1 class="item">Review of
3. <a class="fn url photo" href="http://www.amazon.com/...">An Introduction to Mathematics</a>
4. </h1>
5. <p>
6. <abbr class="rating stars" title="5">* * * * *</abbr>
7. <span class="summary title">Insightful and Provocative</span>,
8. <span class="dtreviewed">March 22, 2002</span>
9. </p>
10. <p class="reviewer">Reviewer:
11. <span class="vcard">
12. <a class="url fn n" href="http://www.amazon.com/...">
13. <span class="given-name">Michael</span>
14. <span class="family-name">Wischmeyer</span>
15. </a>
16. </span>
17. </p>
18. <div class="description">
19. <p>"The study of mathematics is apt to commence in disappointment."</p>

# Revised Book Review (with hReview)

1. <div class="hreview">
2. <h1 class="item">Review of
3. <a class="fn url photo" href="http://www.amazon.com/...">An Introduction to Mathematics</a>
4. </h1>
5. <p>
6. <abbr class="rating stars" title="5">* * * * *</abbr>
7. <span class="summary title">Insightful and Provocative</span>,
8. <span class="dtreviewed">March 22, 2002</span>
9. </p>
10. <p class="reviewer">Reviewer:
11. <span class="vcard">
12. <a class="url fn n" href="http://www.amazon.com/...">
13. <span class="given-name">Michael</span>
14. <span class="family-name">Wischmeyer</span>
15. </a>
16. </span>
17. </p>
18. <div class="description">
19. <p>"The study of mathematics is apt to commence in disappointment."</p>

# Revised Book Review (with hReview)

1. <div class="hreview">
2. <h1 class="item">Review of
3. <a class="fn url photo" href="http://www.amazon.com/...">An Introduction to Mathematics</a>
4. </h1>
5. <p>
6. <abbr class="rating stars" title="5">* * * * *</abbr>
7. <span class="summary title">Insightful and Provocative</span>,
8. <span class="dtreviewed">March 22, 2002</span>
9. </p>
10. <p class="reviewer">Reviewer:
11. <span class="vcard">
12. <a class="url fn n" href="http://www.amazon.com/...">
13. <span class="given-name">Michael</span>
14. <span class="family-name">Wischmeyer</span>
15. </a>
16. </span>
17. </p>
18. <div class="description">
19. <p>"The study of mathematics is apt to commence in disappointment."</p>

# Revised Book Review (with hReview)

1. <div class="hreview">
2. <h1 class="item">Review of
3. <a class="fn url photo" href="http://www.amazon.com/...">An Introduction to Mathematics</a>
4. </h1>
5. <p>
6. <abbr class="rating stars" title="5">* * * * *</abbr>
7. <span class="summary title">Insightful and Provocative</span>,
8. <span class="dtreviewed">March 22, 2002</span>
9. </p>
10. <p class="reviewer">Reviewer:
11. <span class="vcard">
12. <a class="url fn n" href="http://www.amazon.com/...">
13. <span class="given-name">Michael</span>
14. <span class="family-name">Wischmeyer</span>
15. </a>
16. </span>
17. </p>
18. <div class="description">
19. <p>"The study of mathematics is apt to commence in disappointment."</p>

# Revised Book Review (with hReview)

1. <div class="hreview">
2. <h1 class="item">Review of
3. <a class="fn url photo" href="http://www.amazon.com/...">An Introduction to Mathematics</a>
4. </h1>
5. <p>
6. <abbr class="rating stars" title="5">* * * * *</abbr>
7. <span class="summary title">Insightful and Provocative</span>,
8. <span class="dtreviewed">March 22, 2002</span>
9. </p>
10. <p class="reviewer">Reviewer:
11. <span class="vcard">
12. <a class="url fn n" href="http://www.amazon.com/...">
13. <span class="given-name">Michael</span>
14. <span class="family-name">Wischmeyer</span>
15. </a>
16. </span>
17. </p>
18. <div class="description">
19. <p>"The study of mathematics is apt to commence in disappointment."</p>

# Revised Book Review (with hReview)

1. <div class="hreview">
2. <h1 class="item">Review of
3. <a class="fn url photo" href="http://www.amazon.com/...">An Introduction to Mathematics</a>
4. </h1>
5. <p>
6. <abbr class="rating stars" title="5">* * * * *</abbr>
7. <span class="summary title">Insightful and Provocative</span>,
8. <span class="dtreviewed">March 22, 2002</span>
9. </p>
10. <p class="reviewer">Reviewer:
11. <span class="vcard">
12. <a class="url fn n" href="http://www.amazon.com/...">
13. <span class="given-name">Michael</span>
14. <span class="family-name">Wischmeyer</span>
15. </a>
16. </span>
17. </p>
18. <div class="description">
19. <p>"The study of mathematics is apt to commence in disappointment."</p>

# Revised Book Review (with hReview)

1. <div class="hreview">
2. <h1 class="item">Review of
3. <a class="fn url photo" href="http://www.amazon.com/...">An Introduction to Mathematics</a>
4. </h1>
5. <p>
6. <abbr class="rating stars" title="5">* * * * *</abbr>
7. <span class="summary title">Insightful and Provocative</span>,
8. <span class="dtreviewed">March 22, 2002</span>
9. </p>
10. <p class="reviewer">Reviewer:
11. <span class="vcard">
12. <a class="url fn n" href="http://www.amazon.com/...">
13. <span class="given-name">Michael</span>
14. <span class="family-name">Wischmeyer</span>
15. </a>
16. </span>
17. </p>
18. <div class="description">
19. <p>"The study of mathematics is apt to commence in disappointment."</p>

# Revised Book Review (with hReview)

1. <div class="hreview">
2. <h1 class="item">Review of
3. <a class="fn url photo" href="http://www.amazon.com/...">An Introduction to Mathematics</a>
4. </h1>
5. <p>
6. <abbr class="rating stars" title="5">* * * * *</abbr>
7. <span class="summary title">Insightful and Provocative</span>,
8. <span class="dtreviewed">March 22, 2002</span>
9. </p>
10. <p class="reviewer">Reviewer:
11. <span class="vcard">
12. <a class="url fn n" href="http://www.amazon.com/...">
13. <span class="given-name">Michael</span>
14. <span class="family-name">Wischmeyer</span>
15. </a>
16. </span>
17. </p>
18. <div class="description">
19. <p>"The study of mathematics is apt to commence in disappointment."</p>

# Revised Book Review (with hReview)

1. <div class="hreview">
2. <h1 class="item">Review of
3. <a class="fn url photo" href="http://www.amazon.com/...">An Introduction to Mathematics</a>
4. </h1>
5. <p>
6. <abbr class="rating stars" title="5">* * * * *</abbr>
7. <span class="summary title">Insightful and Provocative</span>,
8. <span class="dtreviewed">March 22, 2002</span>
9. </p>
10. <p class="reviewer">Reviewer:
11. <span class="vcard">
12. <a class="url fn n" href="http://www.amazon.com/...">
13. <span class="given-name">Michael</span>
14. <span class="family-name">Wischmeyer</span>
15. </a>
16. </span>
17. </p>
18. <div class="description">
19. <p>"The study of mathematics is apt to commence in disappointment."</p>

# Revised Book Review (with hReview)

1. <div class="hreview">
2. <h1 class="item">Review of
3. <a class="fn url photo" href="http://www.amazon.com/...">An Introduction to Mathematics</a>
4. </h1>
5. <p>
6. <abbr class="rating stars" title="5">* * * * *</abbr>
7. <span class="summary title">Insightful and Provocative</span>,
8. <span class="dtreviewed">March 22, 2002</span>
9. </p>
10. <p class="reviewer">Reviewer:
11. <span class="vcard">
12. <a class="url fn n" href="http://www.amazon.com/...">
13. <span class="given-name">Michael</span>
14. <span class="family-name">Wischmeyer</span>
15. </a>
16. </span>
17. </p>
18. <div class="description">
19. <p>"The study of mathematics is apt to commence in disappointment."</p>

# Revised Book Review (with hReview)

1. <div class="hreview">
2. <h1 class="item">Review of
3. <a class="fn url photo" href="http://www.amazon.com/...">An Introduction to Mathematics</a>
4. </h1>
5. <p>
6. <abbr class="rating stars" title="5">* * * * *</abbr>
7. <span class="summary title">Insightful and Provocative</span>,
8. <span class="dtreviewed">March 22, 2002</span>
9. </p>
10. <p class="reviewer">Reviewer:
11. <span class="vcard">
12. <a class="url fn n" href="http://www.amazon.com/...">
13. <span class="given-name">Michael</span>
14. <span class="family-name">Wischmeyer</span>
15. </a>
16. </span>
17. </p>
18. <div class="description">
19. <p>"The study of mathematics is apt to commence in disappointment."</p>

# Revised Book Review (with hReview)

1. <div class="hreview">
2. <h1 class="item">Review of
3. <a class="fn url photo" href="http://www.amazon.com/...">An Introduction to Mathematics</a>
4. </h1>
5. <p>
6. <abbr class="rating stars" title="5">* * * * *</abbr>
7. <span class="summary title">Insightful and Provocative</span>,
8. <span class="dtreviewed">March 22, 2002</span>
9. </p>
10. <p class="reviewer">Reviewer:
11. <span class="vcard">
12. <a class="url fn n" href="http://www.amazon.com/...">
13. <span class="given-name">Michael</span>
14. <span class="family-name">Wischmeyer</span>
15. </a>
16. </span>
17. </p>
18. <div class="description">
19. <p>"The study of mathematics is apt to commence in disappointment."</p>

# Revised Book Review (with hReview)

- View example01 (with hReview) in a browser.

# Rating Property

- Example: markup this HTML text:

1. I give the movie a rating of 3 stars out of 5.

- Here is the marked up text:

1. I give the movie a rating of <span class="rating">3</span> stars out of 5.

# Rating Property (cont.)

- Example: markup this HTML text using the hReview properties:

1. The Phantom Gourmet rates the restaurant as follows:
2. <ul>
3. <li>Food: 9/10</li>
4. <li>Service: 6/10</li>
5. <li>Ambience: 9.5/10</li>
6. </ul>

- Here is the marked up text:

1. The Phantom Gourmet rates the restaurant as follows:
2. <ul>
3. <li class="rating">Food: <span class="value">9</span>/<span class="best">10</span></li>
4. <li class="rating">Service: <span class="value">6</span>/<span class="best">10</span></li>
5. <li class="rating">Ambience: <span class="value">9.5</span>/<span class="best">10</span></li>
6. </ul>

# Rating Property (cont.)

- Notice in the last example the use of the "value" subproperty. It is a subproperty that can be used with any (composite) Microformat. It is being used to identify which part within
  <li class="rating">...</li> is to be used as the value of "rating".

# hReview Creator

- There is an online tool to help you automatically generate an hReview: hReview Creator
- Go to the Web site and type in your review information.
- Now you can take the XHTML it generates and copy and paste it into a (X)HTML document.
- Thus, you can instantly add an hReview to your Web page!

# Technorati Microformats Search

- Technorati is a search tool that indexes Web pages that contain Microformats (hCard, hCalendar, hReview): http://kitchen.technorati.com/search

# Pingerati Browser Button

- At http://pingerati.net/ is a link that will add an entry ("Ping this!") to your browser's Favorites list.
- When you want to publish to Technorati a Web page that contains Microformats simply click on Ping this!

# hReview Implementations

- Here is a list of hReview implementations: http://microformats.org/wiki/hreview-implementations

# Homepage

- Homepage