e01.org

`itemid` HTML global attribute

The itemid global attribute provides microdata in the form of a unique, global identifier of an item.

The **`itemid`** [global attribute](/docs/Web/HTML/Reference/Global_attributes) 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`](/docs/Web/HTML/Reference/Global_attributes/itemscope) and [`itemtype`](/docs/Web/HTML/Reference/Global_attributes/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.

## Examples

### Representing structured data for a book

This example uses microdata attributes to represent the following structured data:

<table class="standard-table">
<tbody>
<tr>
<td rowspan="4">itemscope</td>
<td>itemtype: itemid</td>
<td colspan="2">https://schema.org/Book: urn:isbn:0-374-22848-5</td>
</tr>
<tr>
<td>itemprop</td>
<td>title</td>
<td>Owls of the Eastern Ice</td>
</tr>
<tr>
<td>itemprop</td>
<td>author</td>
<td>Jonathan C Slaght</td>
</tr>
<tr>
<td>itemprop</td>
<td>datePublished</td>
<td>2020-08-04</td>
</tr>
</tbody>
</table>

#### HTML

```html
<dl
itemscope
itemtype="https://schema.org/Book"
itemid="urn:isbn:0-374-22848-5<">
<dt>Title</dt>
<dd itemprop="title">Owls of the Eastern Ice</dd>
<dt>Author</dt>
<dd itemprop="author">Jonathan C Slaght</dd>
<dt>Publication date</dt>
<dd>
<time itemprop="datePublished" datetime="2020-08-04">August 4 2020</time>
</dd>
</dl>
```

#### Result

Representing structured data for a book

## Specifications

## See also

- All [global attributes](/docs/Web/HTML/Reference/Global_attributes).
- Other microdata related global attributes:
- [`itemprop`](/docs/Web/HTML/Reference/Global_attributes/itemprop)
- [`itemref`](/docs/Web/HTML/Reference/Global_attributes/itemref)
- [`itemscope`](/docs/Web/HTML/Reference/Global_attributes/itemscope)
- [`itemtype`](/docs/Web/HTML/Reference/Global_attributes/itemtype)

source: MDN Web Docs mirror · page

Cite this

"`itemid` HTML global attribute". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/itemid

JSON record · API collection · citation policy