See the hRecipe draft specification.
An hRecipe schema consists of the following properties:
* hrecipe o fn. required. text. the name of the recipe. o ingredient. required. 1 or more. text with optional valid (x)HTML markup. + value and type. optional. [experimental] o yield. optional. text. o instructions. optional. text with optional valid (x)HTML markup. o duration. optional. 1 or more. text. o photo. optional. 1 or more. using any element containing a URL, such as IMG. [experimental] o summary. optional. text. [experimental] o author. optional. 1 or more. [experimental] o published. optional. [experimental] o nutrition. optional. 1 or more. [experimental] + value and type. optional. [experimental] o tag. optional. 1 or more. [experimental]
If you are looking for required fields fn and ingredient are required, the remaining fields are optional.
The following example is a valid hRecipe recipe:
<div class="mydivclass1"> <h1 class="fn">Spaghetti al ragรน</h1> <div class="myfancydiv2>Ingredients:</div> <span class="ingredient"> spaghetti </span> <span class="ingredient"> ragรน </span> </div>
To test your microformats, you can use the cool Optimus validator .
source share