gaash.ai

Microdata

Microdata is a way of writing structured data into the HTML a reader already sees, by adding attributes such as itemscope, itemtype and itemprop to ordinary elements. It is one of the three syntaxes Google reads for schema.org vocabulary, alongside JSON-LD and RDFa.

The five attributes

the microdata section of the HTML standard defines the whole mechanism in five attributes. itemscope on an element creates an item. itemtype gives that item a type as an absolute URL, which for a business is usually a schema.org type such as https://schema.org/LocalBusiness. itemprop on any descendant names a property, and the property’s value is the element’s own content: the text of a span, the href of a link, the datetime of a time element. itemid gives the item a global identifier where the vocabulary allows one. itemref pulls in properties from elements elsewhere in the document by their ids, for the case where the markup cannot nest.

Microdata against JSON-LD

Google’s structured data introduction lists microdata, RDFa and JSON-LD as equally acceptable when valid, and recommends JSON-LD where a site’s setup allows it, as the easiest to implement and maintain at scale; it also reads JSON-LD that a script injected into the page. Microdata’s strength is the mirror image of that: because the value is the visible content, the phone number in the markup cannot drift from the phone number the reader sees. Its cost is that every marked element is load-bearing, so a redesign that moves a span breaks the item without anyone noticing.

A crawler that only parses JSON-LD misses microdata entirely, which is why this site’s own audit reads both. Across 9,483 small-business sites, 17.8% carried no schema.org markup in either syntax, and most of the rest described the website rather than the business; the breakdown is in what 9,483 small business websites serve to an AI crawler.

Which to choose

Whichever one the page can keep correct. A site built by hand or by a template that already emits microdata should keep it and check it. A site whose content management system can write a JSON-LD block from its database should use that, because the block is regenerated from the source of truth rather than maintained in the markup. Using both for the same item invites the two to disagree.

A common question

Should a site that already emits microdata be converted to JSON-LD?

Only if the new format can be kept correct more easily. Google accepts microdata, RDFa and JSON-LD alike when valid and recommends JSON-LD where the setup allows, mainly because a content management system can regenerate the block from its own records. Microdata earns its keep when the markup wraps the visible text, so the phone number in the attributes cannot drift from the one on screen, though a redesign that moves an element breaks the item quietly. Marking the same item in both syntaxes invites the two to disagree.

Related terms

Sources

Attributes: the microdata section of the HTML standard. Supported formats and recommendation: Google’s structured data introduction. The 17.8% figure is this site’s own, from its audit records; sample drawn per metro and trade, not from a random frame.