itemid
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.
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 | http://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
Specifications
Specification |
---|
HTML Standard # attr-itemid |
Browser compatibility
BCD tables only load in the browser