What is microdata?
Microdata is one of the three formats Google accepts for structured data, alongside JSON-LD and RDFa. Instead of a separate script block, it adds attributes to the HTML elements that already show the content: itemscope starts an item, itemtype names its schema.org type, and itemprop marks each property.
Google reads all three formats and recommends JSON-LD. Microdata lives on in many older themes and e-commerce templates.
The same product in both formats
Microdata, woven into the visible markup:
<div itemscope itemtype="https://schema.org/Product">
<h1 itemprop="name">Ceramic pour-over dripper</h1>
<img itemprop="image" src="/img/dripper.jpg" alt="White ceramic dripper">
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<span itemprop="priceCurrency" content="EUR">€</span>
<span itemprop="price" content="24.00">24.00</span>
<link itemprop="availability" href="https://schema.org/InStock">
</div>
</div>
JSON-LD, in one block that is separate from the layout:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Ceramic pour-over dripper",
"image": "https://example.com/img/dripper.jpg",
"offers": {
"@type": "Offer",
"priceCurrency": "EUR",
"price": "24.00",
"availability": "https://schema.org/InStock"
}
}
</script>
Both describe the same thing and, when complete, qualify for the same rich results.
The attributes
itemscopedeclares that the element contains an item.itemtypegives the type as a schema.org URL. It goes on the same element asitemscope.itempropassigns a property. Its value is the element's text, or thesrc,href,contentordatetimeattribute, depending on the element.- A nested
itemscopeon an element that also hasitempropcreates a sub-item, like the Offer above. <meta itemprop="..." content="...">and<link itemprop="..." href="...">supply values that are not shown as text.
How it compares in practice
| Microdata | JSON-LD | |
|---|---|---|
| Where it sits | Inside the visible HTML | In a script block |
| Tied to layout | Yes. Moving or removing an element changes the data | No |
| Stays in step with visible content | By construction | Has to be kept in step by whoever generates it |
| Nesting and linking entities | Awkward beyond two levels | Straightforward, with @id references |
| Added by a plugin without touching templates | Hard | Easy |
Microdata's one real advantage is that the data is the content, so it cannot say something the page does not show. Its cost is fragility: a redesign that drops a wrapper div silently breaks an item, and nobody notices until rich results disappear.
Problems to look for
- Two sets of markup. A theme outputs microdata and a plugin adds JSON-LD for the same thing. Search engines then see two Products or two Articles, often with different values. Keep one source.
- Unclosed scope. An
itempropoutside anyitemscopeis ignored, and a scope closed too early loses its later properties. - Missing machine-readable values. A price written as "from €24" needs a
contentattribute with the number. - Confusing it with microformats. Class names such as
hentryandvcardin older WordPress themes are microformats, a different and older convention. They are not microdata.
Check any page with the Rich Results Test, which parses microdata, RDFa and JSON-LD alike.
Should you switch to JSON-LD?
If your microdata is complete and valid, there is no ranking gain from converting it. Switch when you are rebuilding templates anyway, when markup keeps breaking with design changes, or when you add a plugin that outputs JSON-LD and would otherwise duplicate it. On WordPress the usual path is to let one plugin generate JSON-LD and remove the attributes from theme templates; our guide to adding schema markup to WordPress covers the setup, and the schema markup generator writes JSON-LD you can compare against.
Common questions
Does Google still support microdata?
Yes. Google supports JSON-LD, microdata and RDFa for structured data. It recommends JSON-LD because it is easier to implement and maintain.
Is microdata the same as schema.org?
No. Schema.org is the vocabulary of types and properties. Microdata is one syntax for writing that vocabulary into a page, as JSON-LD and RDFa are.
Can a page use microdata and JSON-LD together?
It can, and Google reads both. Avoid describing the same item in both formats, because conflicting or duplicated values make the data unreliable.