h-review

Jump to: navigation, search

Tantek Çelik (Editor)


h-review is a simple, open format for publishing reviews on the web. h-review is one of several open microformat draft standards suitable for embedding data in HTML/HTML5 on the web.

h-review is the microformats2 update to hReview.

Per CC0, to the extent possible under law, the editors have waived all copyright and related or neighboring rights to this work. In addition, as of 2016-06-26, the editors have made this specification available under the Open Web Foundation Agreement Version 1.0.

Contents

Example

Here is a simple review example:

<div class="h-review">
  <h1 class="p-name">Microformats: is structured data worth it?</h1>
 
  <blockquote>
    <a class="p-item h-item" href="http://microformats.org">Microformats</a> are the simplest way to publish structured data on the web.
  </blockquote>
 
  <p>
    <data class="p-rating" value="5">★★★★★</data>
    Published <time class="dt-published" datetime="2013-06-12 12:00:00">12<sup>th</sup> June 2013</time>
    by <a class="p-author h-card" href="http://example.com">Joe Bloggs</a>.
  </p>
 
  <div class="e-content">
    <p>Yes, microformats are undoubtedly great. They are the simplest way to markup structured data in HTML and reap the benefits thereof, including using your web page as your API by automatic conversion to JSON. The alternatives of microdata/schema and RDFa are much more work, require more markup, and are more complicated (harder to get right, more likely to break).</p>
  </div>
</div>

Parsed JSON:

{
  "items": [
    {
      "type": [
        "h-review"
      ],
      "properties": {
        "name": [
          "Microformats: is structured data worth it?"
        ],
        "item": [
          {
            "value": "Microformats",
            "type": [
              "h-item"
            ],
            "properties": {
              "name": [
                "Microformats"
              ],
              "url": [
                "http://microformats.org"
              ]
            }
          }
        ],
        "rating": [
          "5"
        ],
        "published": [
          "2013-06-12 12:00:00"
        ],
        "author": [
          {
            "value": "Joe Bloggs",
            "type": [
              "h-card"
            ],
            "properties": {
              "name": [
                "Joe Bloggs"
              ],
              "url": [
                "http://example.com"
              ]
            }
          }
        ],
        "content": [
          {
            "value": "Yes, microformats are undoubtedly great. They are the simplest way to markup structured data in HTML and reap the benefits thereof, including using your web page as your API by automatic conversion to JSON. The alternatives of microdata/schema and RDFa are much more work, require more markup, and are more complicated (harder to get right, more likely to break).",
            "html": "<p>Yes, microformats are undoubtedly great. They are the simplest way to markup structured data in HTML and reap the benefits thereof, including using your web page as your API by automatic conversion to JSON. The alternatives of microdata/schema and RDFa are much more work, require more markup, and are more complicated (harder to get right, more likely to break).</p>"
          }
        ]
      }
    }
  ]
}

Get started

The class h-review is a root class name that indicates the presence of an h-review.

p-name, p-item, p-rating, dt-published, p-author, e-content and the other property class names listed below defined elements as properties of the h-review.

The class h-item is a root class name that indicates an embedded h-item for the p-item property.

The class h-card is a root class name that indicates an embedded h-card for the p-author property.

See microformats2-parsing to learn more about property class names.

Properties

h-review properties, inside an element with class h-review:

All properties are optional.

Status

h-review is a microformats.org draft specification. Public discussion on h-review takes place on h-review-feedback and the #microformats irc channel on irc.freenode.net.

h-review is ready to use.

Property Details

(stub, add any property explanations here)

Examples in the Wild

Implementations

Validating

Main article: validators

Test and validate microformats2 markup in general with:

Backward Compatiblity

Publisher Compatibility

For backward compatibility, you may wish to use classic hReview classnames on an h-review permalink page in addition to the more future-proof h-review properties, for example:

<div class="h-review hreview">
  <h1 class="p-name fn">My great review</h1>
</div>

Parser Compatibility

Microformats parsers should detect classic properties and parse them as microformats 2 properties. If an "h-review" is found, don't look for an "hReview" on the same element.

Compatibility root class name: hreview

Properties: (parsed as p- plain text unless otherwise specified)

Note: The hReview format has three properties which make use of rel attribute, these are tag, permalink (via the self and bookmark values) and license. Microformats 2 parsers SHOULD map these URLs into the page scoped rel collection.

prior property names

There may be a handful of h-reviews out there (only one known so far) that use prior h-review property names. Parsers encountering these *may* interpret them as follows:

Background

h-review is based on the existing hReview specification.

See Also

Categories

h-review was last modified: Tuesday, June 7th, 2016

Views