CSS Portal

HTML itemid Global Attribute

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The itemid attribute is a global HTML attribute used in microdata to provide a unique, global identifier for an item. It helps define what a specific item represents by linking it to a unique IRI (Internationalized Resource Identifier), typically a URL.

The itemid attribute is only meaningful when used together with itemscope and usually alongside itemtype.

What itemid Does

The itemid attribute assigns a globally unique identifier to an item defined using microdata. This allows machines (such as search engines, crawlers, or data parsers) to:

  • Identify an item unambiguously
  • Distinguish between similar items
  • Merge or reference the same entity across different pages

It does not affect visual rendering or browser behavior - it is purely semantic metadata.

Valid examples:
itemid="https://example.com/products/12345"
itemid="urn:uuid:550e8400-e29b-41d4-a716-446655440000"

How itemid Works with Microdata

When used with itemscope, itemtype, and itemprop, itemid helps define structured data relationships.

Example: Person

<div itemscope itemtype="https://schema.org/Person"
     itemid="https://example.com/people/jane-smith">
  <span itemprop="name">Jane Smith</span>
  <span itemprop="jobTitle">Web Developer</span>
</div>

In this example:

  • itemscope declares a new item
  • itemtype defines the type (Person)
  • itemid uniquely identifies this specific person
  • itemprop defines properties of the item

When to Use itemid

Use itemid when:

  • You want to uniquely identify an entity
  • The same entity may appear on multiple pages
  • You are working with structured data (e.g., Schema.org)
  • You want search engines or parsers to recognize the item consistently

When Not to Use itemid

Avoid using itemid when:

  • The item does not represent a real or reusable entity
  • The identifier is not stable or permanent
  • You are not using itemscope

itemid has no effect unless itemscope is present.

Relationship to itemtype

  • itemtype describes what kind of thing the item is
  • itemid identifies which specific thing it is

Example:

<div itemscope
     itemtype="https://schema.org/Product"
     itemid="https://example.com/products/widget-2000">

Common Use Cases

  • Products in online stores
  • Authors or people profiles
  • Articles or blog posts
  • Organizations or brands
  • Events and locations

SEO and Search Engines

Search engines may use itemid to:

  • Associate structured data across pages
  • Avoid duplicate entity definitions
  • Improve entity recognition in rich results

However, itemid alone does not guarantee enhanced search appearance - it must be paired with valid structured data.

Key Notes

  • itemid is a global attribute, but only meaningful with microdata
  • The value must be a valid IRI
  • It does not create links or navigation
  • It is invisible to users
  • It improves semantic clarity and data consistency

Simple Example

<div itemscope itemtype="https://schema.org/Book"
     itemid="https://example.com/books/harry-potter">
  <span itemprop="name">Harry Potter and the Philosopher’s Stone</span>
</div>

Syntax

<div itemscope itemtype="https://schema.org/Person" itemid="URL">

Values

  • URLThe value of itemid must be a valid URL or IRI. This URL does not need to be clickable or publicly accessible, but it must uniquely identify the item.

Example

<div itemscope 
itemtype="https://schema.org/Book"
itemid="https://example.com/books/the-great-gatsby">

<h2 itemprop="name">The Great Gatsby</h2>

<p>
Author:
<span itemprop="author">F. Scott Fitzgerald</span>
</p>

<p>
Published:
<span itemprop="datePublished">1925</span>
</p>

</div>

Browser Support

The following information will show you the current browser support for the HTML itemid global attribute. Hover over a browser icon to see the version that first introduced support for this HTML global attribute.

This global attribute is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 27th December 2025

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!