Summary
The Itemid attribute is the unique, global identifier of an item. The global identifier of an item is the value of its element's itemid attribute, if it has one, parsed relative to the node document of the element on which the attribute is specified. If the itemid attribute is missing or if resolving it fails, it is said to have no global identifier.
The itemid attribute can only be specified on elements that have both an itemscope attribute and an itemtype attribute specified. Additionally, an itemid can only be specified on elements with an itemscope attribute whose itemtype attribute specifies a vocabulary that supports global identifiers for items.
The exact meaning of a global identifier is determined by the vocabulary's specification. It is up to such specifications to define whether multiple items with the same global identifier (whether on the same page or on different pages) are allowed to exist, and what the processing rules for that vocabulary are with respect to handling the case of multiple items with the same ID.
Note: The Whatwg.org definition of an itemid says that it must be a URL. This does not seem to be the case as the example below shows. Rather the defacto definition is that an itemid is a unique identifier, so a URN is appropriate. This inconsistency no doubt reflects the incomplete nature of the Microdata specification.
sEditExample
HTML
<dl itemscope itemtype="https://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 |
https://vocab.example.net/book: urn:isbn:0-330-34032-8
|
|
itemprop | title | The Reality Dysfunction | |
itemprop | author |
Peter F. Hamilton
|
|
itemprop | pubdate | 1996-01-26 |
Result
{{ EmbedLiveSample('HTML', '', '', '', 'Web/HTML/Global_attributes/itemid') }}
Specifications
Specification | Status |
---|---|
itemid | WG Note - No longer being actively developed |