BF50 Black Friday · 50% off all plans
from $5/mo · Auto-applied ---:--:-- Claim 50% off →
Skip to content

Search Seonio

Type a keyword, domain, or paste a URL

Start free with $1 to see full results. Powered by Seonio
SEO

Itemprop: How the microdata attribute works

The itemprop attribute names a property of a microdata item, such as name or price. See how each HTML element supplies the value, with examples.

Monthly searches · itemprop
590
Keyword research data
itemprop
Itemprop: How the microdata attribute works
Click the image to view it full size

itemprop is an HTML attribute that labels a piece of a page as one property of a thing. It's part of microdata, one of the three ways to add structured data to HTML. You put it on the element that holds the value, so the label sits right next to the text people read.

Three attributes work together:

  • itemscope starts an item: "everything inside here describes one thing".
  • itemtype says what kind of thing it is, usually with a schema.org URL such as https://schema.org/Product.
  • itemprop names each property of that thing, such as name, price or author.

Each itemprop creates a name-value pair. The attribute gives the name; the element gives the value.

A simple example

Say a shop wants search engines to read a product's name, image and price:

<div itemscope itemtype="https://schema.org/Product">
  <h1 itemprop="name">Trail Runner 2 shoes</h1>
  <img itemprop="image" src="/img/trail-runner-2.jpg" alt="Trail Runner 2, side view">
  <div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
    Price: <data itemprop="price" value="89.00">$89</data>
    <meta itemprop="priceCurrency" content="USD">
    <link itemprop="availability" href="https://schema.org/InStock">In stock
  </div>
</div>

A machine reading this sees a Product with a name, an image URL and an offer with price 89.00 in USD, in stock. The offer is its own item, nested inside the product, because its element carries both itemprop="offers" and itemscope.

Where itemprop takes its value from

The value doesn't always come from the visible text. The HTML standard sets the source by element (WHATWG):

Element with itemprop The value is
Any element that also has itemscope The nested item
<meta> The content attribute
<img>, <audio>, <video>, <iframe>, <embed>, <source>, <track> The URL in src
<a>, <area>, <link> The URL in href
<object> The URL in data
<data>, <meter> The value attribute
<time> The machine-readable datetime
Anything else (<span>, <h1>, <p>...) The element's text

So <time itemprop="datePublished" datetime="2026-03-14">14 March</time> gives the full date to machines and a friendly one to people. When a property's value is a URL, such as image or url, use one of the URL elements so the value is read from src or href.

Google's own microdata examples take a different route for the price: a <meta itemprop="price" content="119.99"> placed next to the visible price. Both forms follow the standard. <data> keeps the label on the text people read; <meta> works when the visible text can't carry the attribute. Don't put a content attribute on a <span> or <div>: in the microdata standard those elements give their text, so a parser that follows it ignores the attribute.

Rules for property names

  • Several names, one value. itemprop="name headline" adds the same value under both names. Spaces separate names, so a name can't contain a space.
  • One name, several values. Repeating itemprop="review" on three elements gives the item three reviews.
  • Use the vocabulary's names. With a schema.org itemtype, use the property names schema.org defines for that type, spelled exactly (datePublished, not date-published).
  • Your own names. Without a type, you can make up names, but they can't contain a dot or a colon. A colon would make the name look like a URL, and dots are reserved for future use.

Does itemprop help SEO?

On its own, itemprop changes nothing on screen. It helps search engines read facts on the page, and Google uses supported structured data to show rich results such as product prices, ratings and recipe details.

Google reads microdata, JSON-LD and RDFa and says all three are equally fine if the markup is valid. It recommends JSON-LD in most cases because it sits in one <script> block and is easier to maintain (Google Search Central). Microdata still suits templates where the data already sits in the HTML, and many older themes and plugins use it.

Two rules matter more than the format:

  • Mark up what readers can see. Google's structured data policies say not to mark up content that isn't visible on the page. <meta> is fine for a machine-readable form of something shown, such as the currency behind "$89", not for facts the page never mentions.
  • Use the properties Google documents. Each rich result in Google's search gallery lists required and recommended properties. Valid schema.org markup without them won't produce that rich result.

How to test itemprop markup

Run the page through the Rich Results Test, which reads microdata as well as JSON-LD and RDFa and shows which Google rich results the page can get. For schema.org types Google doesn't use, or to check general syntax, use the Schema Markup Validator at validator.schema.org.

Common faults the tests reveal are an itemprop outside any itemscope, a misspelled property name, a URL property on a <span> instead of a link or image, and a date written only in words without a datetime.

Seonio

Put it to work on your own site

Keyword research, traffic, backlinks and clustering in one place. Start with a free $1 to test, no card required.