h-product: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(Category:Draft Specifications)
(properties intro sentence, move backward compatiblity to its own section)
Line 30: Line 30:


== Properties ==
== Properties ==
 
h-product properties, inside an element with class '''h-product''':
* '''<code>p-name</code>''' - name of the product
* '''<code>p-name</code>''' - name of the product
* '''<code>u-photo</code>''' - photo of the product
* '''<code>u-photo</code>''' - photo of the product
Line 41: Line 41:
* '''<code>p-price</code>''' - retail price of the product
* '''<code>p-price</code>''' - retail price of the product


== Status ==
'''h-product''' is a microformats.org draft specification. Public discussion on h-product takes place on [[h-product-feedback]], the #microformats [[irc]] channel on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-new/ microformats-new mailing list].
h-product is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-products up with classic [[hProduct]] classnames.
== Property Details ==
(stub, add any property explanations here)
TODO: u-identifier supposedly “includes type” — how so? URI scheme? Need examples of how to mark up the various different identifier types.
'''price''' was an experimental property which has real world adoption due to [[Google]] and [[Bing]] search support of hProduct. Due to this it has been included in the updated h-product spec.
== Examples in the Wild ==
* … add any h-product examples you find in the wild
== Backward Compatibility ==
=== Publisher Compatibility ===
For backward compatibility, you may wish to use classic [[hProduct]] classnames in addition to the more future-proof h-product properties, for example:
For backward compatibility, you may wish to use classic [[hProduct]] classnames in addition to the more future-proof h-product properties, for example:


Line 49: Line 69:
</source>
</source>


Microformats parsers should detect classic properties and parse them as microformats 2 properties. If an "h-product" is found, don't look for an "hProduct" on the same element.
=== Parser Compatibility ===
Microformats parsers should detect classic properties and parse them as microformats2 properties. If an "h-product" is found, don't look for an "hProduct" on the same element.


Compatibility root class name: hProduct
Compatibility root class name: hProduct
Line 64: Line 85:
* <code>review</code> - including compat root class <code>hreview</code> in the absence of <code>h-review</code>
* <code>review</code> - including compat root class <code>hreview</code> in the absence of <code>h-review</code>
* <code>price</code>
* <code>price</code>
== Status ==
'''h-product''' is a microformats.org draft specification. Public discussion on h-product takes place on [[h-product-feedback]], the #microformats [[irc]] channel on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-new/ microformats-new mailing list].
h-product is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-products up with classic [[hProduct]] classnames.
== Property Details ==
(stub, add any property explanations here)
TODO: u-identifier supposedly “includes type” — how so? URI scheme? Need examples of how to mark up the various different identifier types.
'''price''' was an experimental property which has real world adoption due to [[Google]] and [[Bing]] search support of hProduct. Due to this it has been included in the updated h-product spec.
== Examples in the Wild ==
* … add any h-product examples you find in the wild


== Background ==
== Background ==

Revision as of 00:28, 15 June 2013

<entry-title>h-product</entry-title> Tantek Çelik (Editor)


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

h-product is the microformats2 update to hProduct.

Example

Here is a simple minimal product example:

<div class="h-product">
  <h1 class="p-name">Microformats For Dummies</h1>
  <img class="u-photo" src="http://example.org/mfd.png" alt="" />
  <div class="e-description">
    <p>Want to get started using microformats, but intimidated by hyphens and mediawiki? This book contains everything you need to know!</p>
  </div>
  <p>Yours today for only <data class="p-price" value="20.00">$20.00</span>
     from <a class="p-brand h-card" href="http://example.com/acme">ACME Publishing inc.</a>
  </p>
</div>

Get started

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

p-name, p-price, u-photo and the other property classnames listed below define elements as properties of the h-product.

See microformats-2-parsing to learn more about property classnames.

Properties

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

  • p-name - name of the product
  • u-photo - photo of the product
  • p-brand - manufacturer, can also be a nested h-card
  • p-category - freeform categories or tags applied to the item by the reviewer
  • e-description
  • u-url - URL of the product
  • u-identifier - includes type (e.g. mpn, upc, isbn, issn, sn, vin, sku etc.) and value.
  • p-review - a review of the product, can also be a nested h-review
  • p-price - retail price of the product

Status

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

h-product is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-products up with classic hProduct classnames.

Property Details

(stub, add any property explanations here)

TODO: u-identifier supposedly “includes type” — how so? URI scheme? Need examples of how to mark up the various different identifier types.

price was an experimental property which has real world adoption due to Google and Bing search support of hProduct. Due to this it has been included in the updated h-product spec.

Examples in the Wild

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

Backward Compatibility

Publisher Compatibility

For backward compatibility, you may wish to use classic hProduct classnames in addition to the more future-proof h-product properties, for example:

<div class="h-product hproduct">
  <h1 class="p-name fn">Product Name</h1>
</div>

Parser Compatibility

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

Compatibility root class name: hProduct

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

  • fn - parse as p-name
  • photo - parse as u-
  • brand
  • category
  • description
  • identifier - parse as u-
  • url - parse as u-
  • review - including compat root class hreview in the absence of h-review
  • price

Background

h-product is based on the existing hProduct specification.

See Also