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
itemidrepresents - How it relates to
itemscopeanditemtype - 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
itemidbelongs with an item scope and is not the same as an HTMLid.- It is metadata for machines; visible text still needs to be clear for people.
- Do not invent unstable or misleading identifiers.
- Use the vocabulary's documentation and validate the resulting structured data.
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.