HTML reference

itemid

The itemid attribute gives a Microdata item a globally meaningful URL identifier. It is used on an element that also has itemscope.

What you will learn

  • What URL identifier itemid represents
  • How it relates to itemscope and itemtype
  • How to choose a structured-data format

Basic example

<article itemscope itemtype="https://schema.org/Article"
         itemid="https://example.com/articles/hello">
  <h1 itemprop="headline">Hello</h1>
</article>

Here, itemscope starts an item, itemtype describes its vocabulary type, and itemid identifies that specific item. The value should be an absolute URL that consistently refers to the same entity.

Important limits

Microdata or JSON-LD?

Microdata annotates visible markup. JSON-LD keeps structured data in a separate script block and may be easier to maintain for larger applications. Choose one well-supported approach and keep it consistent with the page content.

Related pages