hRecipe 0.22

(Difference between revisions)

Jump to: navigation, search
(Example in the wild: recipes now use hRecipe)
(Examples in the wild)
Line 368: Line 368:
Sites and pages that publish hRecipes. When it gets too big we can move it to a separate page like [[hrecipe-examples-in-wild]].
* []'s [ recipes] have been marked up with hRecipe as of April 2010. (E.g., [ Chocolate, Almond, and Banana Parfaits])
* [ Williams-Sonoma]'s [ recipes section], e.g. [ Cherry Almond Bundt Cake]
* has marked up all their recipes with hRecipe as of 2009-10, e.g. [ Deep-Dish Apple Pie recipe]

Revision as of 02:56, 8 April 2010




hRecipe is a simple, open, distributed format, suitable for embedding information about recipes for cooking in (X)HTML, Atom, RSS, and arbitrary XML. hRecipe is one of several microformats open standards. This page and Microformat is in the public domain.

hRecipe Microformat Draft Specification




Andy Mabbett, Frances Berriman, Cameron Perry, John LeMasney, Tantek Çelik, SudarshanP, Ciaran McNulty, Lee Jordan, Robert Bachmann, jeffmcneill, Manu Sporny, Ryan King, HollyMarieKoltz, Straup, Christophe Ducamp, Mercman, Yde, Ameer Dawood, Scottk, Lee Jordan, MonroAlmon, EstevaoSamuel, Brian Suda, SteveL, JohnLeMasney,

Microformats #Copyright and #Patents statements apply.



It is difficult for a browser to extract semantic information about a recipe described on a web page. Metadata such as author and name and details such as ingredients, method, preparation time etc provide relevant information about the recipe.

Having such information marked up can provide a number of benefits to the viewer. If a web browser understands that a particular web page contains a recipe with specific characteristics, it can produce richer interactions. For example, specific searches may be performed for ingredients or authors via general search services such as Google and Wikipedia. Additionally, classification by crawlers can become more accurate. If there are 20 recipes found on a page, and they all contain a certain ingredient, it can be assumed that the page is not only about cooking, but also about that particular ingredient.

In order to enable and encourage the sharing, distribution, syndication, and aggregation of recipes, the authors propose the hRecipe microformat, an open standard for distributed recipe metadata. The authors have researched both numerous recipe-examples in the wild and earlier attempts at recipe-formats, and have designed hRecipe around a simple minimal schema for recipe content. Feedback is encouraged on the hRecipe feedback page.

Inspiration and Acknowledgments

Many thanks to the various individuals that did research and proposed ideas and discussion related to the hRecipe-format and recipes in general.


hRecipe is a format to annotate descriptions and lists of ingredients for the preparation of food and meals. Recipes consistently share several common properties. hRecipe has been based on this minimal common subset.

Out of scope

Recipes that are not for stuff that's meant to be eaten by humans are out of scope.



In General

The hRecipe format is based on a set of properties common to numerous recipe sites and formats in use today on the web. Where possible property names have been chosen based on those defined by related microformat standards.
Some properties are marked experimental since they exceed the minimum set of properties needed to describe a recipe but still are very commonly used on the web. It's not sure if they are relevant enough for inclusion in the format. Implementation and general uptake of these properties will be observed and inform further decisions. So their use is not at all discouraged - but use them with care and be prepared for their eventual removal from the final spec.


The hRecipe schema consists of the following properties:

Property details

Property names fn, photo, author, value and type are reused from hCard. Property name duration is reused from hAudio. Property name summary is reused from hCalendar. Property name published is reused from hAtom. Property name tag is reused from rel-tag.

The fields of the hRecipe schema represent the following:


A hRecipe is used to identify and describe values and metadata typically associated with a recipe.


The title of a single recipe. A short textual description used to identify the work among interested parties. This can be the name of a meal or a short description regarding it's ingredients.


Describes one or more ingredients used in the recipe.


Specifies the quantity produced by the recipe, like how many persons it satisfyies or how many pieces can be made of it.


The method of the recipe.


The time it takes to prepare the meal described by the recipe. Multiple duration properties can be used to denote e.g. time for preparing a dough, time needed for the dough to raise, time to bake the dough, time for decorating the cake etc.


Accompanying image.


The summary provides a short introduction to or an accompanying statement about the recipe.


An author is the person who wrote the recipe.


The date the recipe was published.


Nutritional information like calories, fat, dietary fiber etc.


A keyword indicating a subject or an important aspect of the recipe like it's main ingredient, type of meal etc.

Version history

Parser Processing Notes

Semantic XHTML Design Principles




More Semantic Equivalents

For some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:


Human vs. Machine Readable

If an <abbr> element is used for a property, then its 'title' attribute is used for the value of the property, instead of the contents of the element, which can then be used to provide a user-friendly alternate presentation of the value.

If an <a> element is used for one or more properties, it MUST be treated as follows:

  1. For the 'photo' property and any other property that takes a URL as its value, the href="..." attribute provides the property value.

If an <img> element is used for the 'photo' property, it MUST use the property value provided by the src="..." attribute as property value.

If an <object> element is used for the 'photo' property, it MUST use the property value provided by the data="..." attribute as property value.


This section is informative.

XMDP Profile

<dl class="profile">
  <a rel="help" href="">
  and their meanings as suggested by a 
  <a href="">
    Used to identify and describe metadata associated with instructions for creating meals, drinks or food-based items.
    The title of the recipe.
    Describes the ingredient(s) used in the recipe.
    Specifies the quantity produced by the recipe.
    The method of the recipe.
    Accompanying image.
   The person who authored the recipe..
    The date that the recipe was made available to the public.
    Nutritional information like calories, fat, dietary fiber etc.
    Keyword(s) describing the recipe.


This section is informative.

Here will be a few examples of recipes, from real web sites, showing how they could be easily enhanced to use hRecipe. In the meantime the following contrieved example will have to do.

<div class="hrecipe">
    <h1 class="fn">Pommes Frites</h1>
    <p class="summary">
        Pommes frites originate in outer space. They are served hot.<br />
        This recipe is only an example. Don't try this at home!
        Contributed by <span class="author">CJ Tom</span> and the
        <span class="author vcard"><a class="url fn" href="">Cooky Gang</a></span>.
     <p>Published <span class="published"><span class="value-title" title="2008-10-14T10:05:37-01:00"> </span>14. Oct 2008</span></p>
    <img src="/img/pommes.png" class="photo" width="100" height="100" alt="Pommes Frites"/>
        <li class="ingredient">
            <span class="value">500</span> 
            <span class="type">gramme</span> potatoes, hard cooking.
        <li class="ingredient">
            <span class="value">1</span> <span class="type">spoonful</span> of salt
            You may want to provide some 
            <span class="ingredient">Ketchup and Mayonnaise</span>
            as well.
    <ul class="instructions">
        <li>First wash the potatoes.</li>
        <li>Then slice and dice them and put them in boiling fat.</li>
        <li>After a few minutes take them out again.</li>
    <h2>Further details</h2>
    <p>Enough for <span class="yield">12 children</span>.</p>
    <p>Preparation time is approximately 
        <span class="duration"><span class="value-title" title="PT1H30M"> </span>90 min</span>
    <p>Add <span  class="duration"><span class="value-title" title="PT30M"></span>half an hour</span> to prepare your homemade Ketchup.</p>
    <p>This recipe is <a href="" rel="tag">easy</a> and <a href="" rel="tag">delicious</a>.</p>
        <span class="nutrition">
        Pommes Frites have more than 
        <span class="value">1000</span> 
        <span class="type">Joule</span>
        while Ketchup and Mayonnaise have 
        <span class="nutrition">0 vitamins</span>.

Examples in the wild

This section is informative.

Sites and pages that publish hRecipes. When it gets too big we can move it to a separate page like hrecipe-examples-in-wild.


This section is informative.

Tools for generating and consuming hRecipes. When it gets too big we can move it to a separate page like hrecipe-implementations.


Normative References

Informative References


Per Microformats_Wiki:Copyrights, hRecipe was placed into the public domain on 2008-11-14 by the authors. There are no usage, distribution, re-printing, or any other restrictions of any kind with regards to the text or content of this specification.



Public Domain Release

The authors and editors of this page due hereby relinquish their copyright on the document and release the text of this page into the public domain.

Work in progress


derivative works

related pages

Per the microformats process, the recipe effort developed

towards the development of this draft.


hRecipe 0.22 was last modified: Wednesday, December 31st, 1969