The hRecipe microformat

hRecipe is an (X)HTML markup standard for culinary recipes developed by an international initiative. This markup allows you to automatically process the recipes on the site pages. Semantic elements (the dish ingredients, the preparation method, the cooking time) are retrieved from the text. The markup isn't visible to the site visitors and does not affect the display of information on the page.

For example, a site page with the following recipe:

Chicken in beer with rice

Ingredients:

  • 1 chicken

  • 0.5 l beer

  • salt

  • pepper

  • spices to taste

Cooking method:

  • Cut the chicken into pieces, put it in a baking dish, add salt, pepper and spices to taste.

  • Pour the beer on the chicken and put it in the oven.

  • Bake at 180 degrees for 40-45 minutes.

The HTML code of the page marked up with the hRecipe format looks like this:

<div class="hrecipe">
    <h1 class="fn">Beer chicken with rice</h1>
    <h2>Ingredients</h2>
    <ul>
        <li class="ingredient">
            <span class="amount">1</span>
            <span class="name">chicken</span>
        </li>
        <li class="ingredient">
            <span class="value">0.5</span>
            <span class="type">l</span>
            <span class="name">beer</span>
        </li>
        <li class="ingredient">
            <span class="name">salt</span>
        </li>
        <li class="ingredient">
            <span class="name">pepper</span>
        </li>
        <li class="ingredient">
            <span class="name">spices</span>
            <span class="amount">according to taste</span>
        </li>
    </ul>
    <h2>Cooking method</h2>
    <ul class="instructions">
        <li class="instruction" >Cut the chicken into pieces and place them in a baking dish. Add salt, pepper, and spices to your liking.</li>
        <li class="instruction" >Pour the beer over the chicken and put it in the oven.</li>
        <li class="instruction" >Bake at 180 C for 40-45 minutes.
        </li>
    </ul>
</div>

The draft specification of the hRecipe format is at http://microformats.org/wiki/hRecipe.

For the fields processed by Yandex, see the Description of the elements processed by Yandex.

The hCard markup is processed at the same time as your site is indexed by the Yandex search robot. The extracted data is validated and can be used to display the recipe elements on the search results page (see Owners of culinary sites).

Note.

Note that the data marked with the hRecipe format becomes public and can be extracted and used by any service.