Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / HTML

itemid — global identifier for a microdata item

The itemid attribute gives a microdata item a global URL identifier. It requires itemscope and an itemtype that selects a vocabulary supporting global identifiers.

Version: WHATWG HTML Living Standard; index snapshot date recorded separately

Syntax

itemid="URL"

itemid identifies a microdata item, allowing descriptions of that item on different pages to be related. It is allowed only on an element with both itemscope and itemtype, where the selected vocabulary supports global identifiers.

Its value is a valid URL, optionally surrounded by spaces. A relative URL is resolved relative to the element's document, so the base URL context matters. An absent attribute or failed parsing means no global identifier; parsing failure does not make an invalid value conforming.

Do not confuse itemid with id: the former identifies a data item, while the latter identifies a document element. itemref references element IDs to locate additional properties, not the item's global identifier. The vocabulary defines the meaning of itemid and whether duplicates are allowed and how they are handled.

In the example, itemtype specifies the type https://schema.org/Book, and itemid gives the item the global identifier https://example.com/books/0-330-34032-8.

Examples

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>itemid example</title>
</head>
<body>
  <article itemscope itemtype="https://schema.org/Book"
           itemid="https://example.com/books/0-330-34032-8">
    <h1 itemprop="name">The Reality Dysfunction</h1>
    <meta itemprop="isbn" content="0-330-34032-8">
  </article>
</body>
</html>

Result

The microdata Book has the global identifier https://example.com/books/0-330-34032-8.

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources