What is microdata?
Microdata is a way of marking up structured data with attributes in the HTML of a page, such as itemscope, itemtype and itemprop. Using the schema.org vocabulary, you tell search engines that a piece of text is, for example, a price, a rating or an address.
Why is microdata important?
- Better understanding: search engines grasp more quickly what a page is about.
- Chance of rich results: well-marked data can enrich how your page appears in Google.
- An alternative to JSON-LD: Google supports microdata but recommends JSON-LD because it is easier to maintain.
Examples of microdata
<div itemscope itemtype="https://schema.org/Product">around a product block<span itemprop="price">49.95</span>for the price<span itemprop="ratingValue">4.6</span>for an average rating
How do you use microdata?
For new pages, choose JSON-LD where possible. If microdata is already built into your theme or store, check it with Google’s Rich Results Test to see that everything is read correctly. Need help with markup? Look at technical SEO.