h-review: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (→‎Properties: i.e. != e.g.)
(editorial review / backcompat edits)
Line 11: Line 11:
<source lang=html4strict>
<source lang=html4strict>
<div class="h-review">
<div class="h-review">
   <h1 class="p-name">Microformats: Worth the hassle?</h1>
   <h1 class="p-name">Microformats: is structured data worth it?</h1>
    
    
   <blockquote>
   <blockquote>
Line 24: Line 24:
    
    
   <div class="e-description">
   <div class="e-description">
     <p>Yes, microformats are undoubtedly great. Unless of course you want to mark up volcanoes with fax machines, in which case schema.org is better suited to your needs.</p>
     <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>
</div>
</div>
Line 32: Line 32:
The class '''<code>h-review</code>''' is a ''root class name'' that indicates the presence of an h-review.
The class '''<code>h-review</code>''' is a ''root class name'' that indicates the presence of an h-review.


'''p-name''', '''p-item''', '''p-reviewer''' and the other property classnames listed below defined elements as ''properties'' of the h-review.
'''p-name''', '''p-item''', '''p-rating''', '''dt-reviewed''', '''p-reviewer''', '''e-description''' and the other property class names listed below defined elements as ''properties'' of the h-review.
 
The class '''<code>h-item</code>''' is a ''root class name'' that indicates an embedded '''[[h-item]]''' for the p-item property.
 
The class '''<code>h-card</code>''' is a ''root class name'' that indicates an embedded '''[[h-card]]''' for the p-reviewer property.


See [[microformats-2-parsing]] to learn more about property class names.
See [[microformats-2-parsing]] to learn more about property class names.
Line 40: Line 44:


* '''<code>p-name</code>''' - name of the review
* '''<code>p-name</code>''' - name of the review
* '''<code>p-item</code>''' - thing been reviewed e.g. business or person ([[h-card]]), event ([[h-event]]), place ([[h-adr]] or [[h-geo]]), product ([[h-product]]), website, url, or other item ([[h-item]]).
* '''<code>p-item</code>''' - thing been reviewed, including embedded microformat for e.g. business or person ([[h-card]]), event ([[h-event]]), place ([[h-adr]] or [[h-geo]]), product ([[h-product]]), website, url, or other item ([[h-item]]).
* '''<code>p-reviewer</code>''' - person who authored the review, optionally a nested [[h-card]]
* '''<code>p-reviewer</code>''' - person who authored the review, optionally with an embedded [[h-card]]
* '''<code>dt-reviewed</code>''' - date time of when the review was written
* '''<code>dt-reviewed</code>''' - date time of when the review was written
* '''<code>p-rating</code>''' - value from 1-5 indicating a rating for the item (5 best).
* '''<code>p-rating</code>''' - value from 1-5 indicating a rating for the item (5 best).
Line 53: Line 57:
'''h-review''' is a microformats.org draft specification. Public discussion on h-review takes place on [[h-review-feedback]], the #microformats [[irc]] channel on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-new/ microformats-new mailing list].
'''h-review''' is a microformats.org draft specification. Public discussion on h-review takes place on [[h-review-feedback]], the #microformats [[irc]] channel on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-new/ microformats-new mailing list].


h-review is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-reviews up with classic [[hReview]] classnames.
h-review is ready to use and implemented in the wild.


== Property Details ==
== Property Details ==
Line 94: Line 98:


== Background ==
== Background ==
h-review is based on the existing [[hReview]] specification, which was extracted from [[hCard]] in order to allow it to be used for applications other than contact information.
h-review is based on the existing [[hReview]] specification.


== See Also ==
== See Also ==
* [[microformats-2]]
* [[microformats2]]
* [[h-card]],
* [[h-card]]
* [[h-event]],
* [[h-event]]
* [[h-adr]],
* [[h-adr]]
* [[h-geo]],
* [[h-geo]]
* [[h-product]] can all be nested in h-review as the p-item
* [[h-product]] can all be nested in h-review as the p-item
* [[h-item]] is a tiny microformat in case none of the others suitably represent the item being reviewed
* [[h-item]] is a minimal microformat in case none of the others suitably represent the item being reviewed


[[Category:Draft Specifications]]
[[Category:Draft Specifications]]

Revision as of 18:40, 17 June 2013

<entry-title>h-review</entry-title> 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 microformats-2 update to hReview.

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-reviewed" datetime="2013-06-12 12:00:00">12<sup>th</sup> June 2013</time>
    by <a class="p-reviewer h-card" href="http://example.com">Joe Bloggs</a>.
  </p>
  
  <div class="e-description">
    <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>

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-reviewed, p-reviewer, e-description 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-reviewer property.

See microformats-2-parsing to learn more about property class names.

Properties

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

  • p-name - name of the review
  • p-item - thing been reviewed, including embedded microformat for e.g. business or person (h-card), event (h-event), place (h-adr or h-geo), product (h-product), website, url, or other item (h-item).
  • p-reviewer - person who authored the review, optionally with an embedded h-card
  • dt-reviewed - date time of when the review was written
  • p-rating - value from 1-5 indicating a rating for the item (5 best).
  • p-best - define best rating value. can be numerically lower than worst.
  • p-worst - define worst rating value. can be numerically higher than best.
  • e-description - the full text written evaluation and opinion of the reviewer
  • p-category - freeform categories or tags applied to the item by the reviewer
  • u-url - review permalink URL

Status

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

h-review is ready to use and implemented in the wild.

Property Details

(stub, add any property explanations here)

Examples in the Wild

  • … add any h-review examples you find in the wild

Backward Compatiblity

Publisher Compatibility

For backward compatibility, you may wish to use classic hReview classnames 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)

  • summary parse as p-name
  • fn - parse as p-name of the item being reviewed (p-item h-item p-name)
  • photo - parse as u-photo of the item being reviewed (p-item h-item u-photo)
  • url - parse as u-url of the item being reviewed (p-item h-item u-url)
  • reviewer - including compat root vcard in the absence of h-card
  • dtreviewed - parse as dt-
  • rating
  • best
  • worst
  • description - parse as e-
  • rel=tag - parse as p-category
  • rel="self bookmark" - parse as u-url. note that rel attribute value is treated as a space separated set, thus any presence of "self" and "bookmark" within such a set in a rel value is accepted.

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.

Background

h-review is based on the existing hReview specification.

See Also