Web/HTML/Global attributes/itemid

From Get docs


The itemid global attribute provides microdata in the form of a unique, global identifier of an item. An itemid attribute can only be specified for an element that has both itemscope and itemtype attributes. Also, itemid can only be specified on elements that possess an itemscope attribute whose corresponding itemtype refers to or defines a vocabulary that supports global identifiers.

The exact meaning of an itemtype's global identifier is provided by the definition of that identifier within the specified vocabulary. The vocabulary defines whether several items with the same global identifier can coexist and, if so, how items with the same identifier are handled.

Note: The WHATWG definition specifies that an itemid must be a URL. However, the following example correctly illustrates that a URN may also be used. This inconsistency may reflect the incomplete nature of the Microdata specification.

Example

HTML

<dl itemscope
    itemtype="http://vocab.example.net/book"
    itemid="urn:isbn:0-330-34032-8">
<dt>Title <dd itemprop="title">The Reality Dysfunction
<dt>Author <dd itemprop="author">Peter F. Hamilton
<dt>Publication date
<dd><time itemprop="pubdate" datetime="1996-01-26">26 January 1996</time> </dl>

Structured data

itemscope itemtype: itemid
itemprop title The Reality Dysfunction
itemprop author

Peter F. Hamilton

itemprop pubdate 1996-01-26

Result

Specifications

Specification Status Comment
HTML Living StandardThe definition of 'itemid' in that specification. Living Standard

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
itemid Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support Yes

IE

Full support Yes

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

Legend

Full support  
Full support


See also

  • All global attributes.
  • Other, microdata related, global attributes:
    • itemid
    • itemprop
    • itemref
    • itemscope
    • itemtype

itemid by Mozilla Contributors is licensed under CC-BY-SA 2.5.