Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Best practices
*Examples are truncated, more necessary fields will be discussed later in this document.
Confidential + Proprietary
Getting started: testing existing markup
To get started with evaluating recipes on a given site, use the Search Console to run a
Rich results status report. *Note: this report is for a standard, static website with no recipe markup, your console view will likely look different.
Confidential + Proprietary
Further testing: necessary fields Note: Sometimes the tool times out. Just keep trying!
Find out whether a specific recipe page has the necessary fields by using the
Structured Data Testing Tool.
Having warnings is usually okay
This will show a preview of the unless the recipe is missing either
markup as it’s rendered by mobile “recipeIngredient” or
search. It’s a good indicator as to “recipeInstructions”. Having either of
whether your markup is working, but those as a warning means the recipe
The “Recipe” type is mandatory. If you there is no specialised preview for won’t be read by the smart display.
do not see this as a result, the recipe smart displays at this time.
will not show up on the smart display.
Confidential + Proprietary
*Note fields (1) and (2) may be combined to one HTML tag if using the Microdata or RDFa formats.
Partial Example from Tesco
Best practices
Images
Acceptable:
"image": [
"https://realfood.tesco.com/media/images/Beef-panang-curry.jpg"
]
It is better to give a few fallback
images of different sizes and
resolutions to target a larger number
of devices and screen sizes.
Confidential + Proprietary
Best practices
recipeIngredient
One indice in the recipeIngredient array per item: One correctly attributed HTML tag per item:
"recipeIngredient": [ Microdata:
"1 box Pillsbury dough", <span itemprop="recipeIngredient">3 or 4 ripe bananas, smashed</span>
"6 cups thinly sliced, peeled apples (6 medium)", <span itemprop="recipeIngredient">1 egg</span>
"3/4 cup sugar", <span itemprop="recipeIngredient">3/4 cup of sugar</span>
"2 tablespoons all-purpose flour",
"3/4 teaspoon ground cinnamon",
"1/4 teaspoon salt", RDFa:
"1/8 teaspoon ground nutmeg", <span property="recipeIngredient">3 or 4 ripe bananas, smashed</span>
"1 tablespoon lemon juice" <span property="recipeIngredient">1 egg</span>
] <span property="recipeIngredient">3/4 cup of sugar</span>
Confidential + Proprietary
Best practices NOTE: Though this option gives the editor slightly more control, the
smart display will still split instructions at every sentence.
recipeInstructions - See details Using HowToStep may give more control over future/non-Google uses of this markup (as
the format is open source), but isn’t necessary for the current smart display functionality.
Separate each step into a “HowToStep” When not using “HowToStep”, the smart display will split
instructions “based on the context”, which means at
JSON-LD is used here for the example, see the every sentence:
schema.org entry for HowToStep for more.
"recipeInstructions": "Preheat the oven to 350 degrees. Mix in the
"recipeInstructions": [ ingredients in a bowl. Add the flour last. Pour the mixture into a loaf
{ pan and bake for one hour."
"@type": "HowToStep",
"text": "Heat oven to 425°F."
}, {
"@type": "HowToStep", 1. Preheat the oven to 350 degrees.
"text": "Place 1 pie crust in ungreased 9-inch glass pie plate, 2. Mix in the ingredients in a bowl.
pressing firmly against side and bottom." 3. Add the flour last.
}
]
4. Pour the mixture into a loaf pan and bake for one hour.
Hint: For more complicated instructions with sections, see documentation & examples for HowToSection
Confidential + Proprietary
Common mistakes
Grouping all ingredients into one code block where only the parent has the correct attribute markup:
✖ ✔
Adding extra metadata to recipeInstruction or HowToStep:
(Google tries its best to guess which of the extra metadata to remove, so best to not include it at all, especially in JSON-LD)
"recipeInstructions": [{ "recipeInstructions": [{
"@type": "HowToStep", "@type": "HowToStep",
"text": "Step 1. Heat oven to 425°F." "text": "Heat oven to 425°F."
}] }]
✖ ✔ Confidential + Proprietary
FAQs
Can I use more than one cuisine or category for the recipeCuisine or recipeCategory fields?
Yes, format them in a comma-separated list like the format for the keywords field.
Do I need to implement all fields that are coming up as “Warnings” in the tests?
Both recipeIngredient and recipeInstructions are required, but other warnings are not required fixes.
However, it is better from a user perspective to have as much information available as possible, so
making the information in the other fields markup-compatible (like recipeCuisine or aggregateRating) will
give the user more details when they’re making their recipe selection.
Confidential + Proprietary