Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

HTML itemid global attribute

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

Anitemid attribute can only be specified for an element that has bothitemscope anditemtype attributes. Also,itemid can only be specified on elements that possess anitemscope attribute whose correspondingitemtype refers to or defines a vocabulary that supports global identifiers.

The exact meaning of anitemtype'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:TheWHATWG definition specifies that anitemid must be aURL. However, the following example correctly illustrates that aURN 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:

itemscopeitemtype: itemidhttps://schema.org/Book: urn:isbn:0-374-22848-5
itemproptitleOwls of the Eastern Ice
itempropauthorJonathan C Slaght
itempropdatePublished2020-08-04

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

Specifications

Specification
HTML
# attr-itemid

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp