itemid
Itemid Attribute
The itemid
attribute assigns a unique global identifier to an item within the context of Microdata. It is used together with the itemscope
and itemtype
attributes.
Syntax
<element itemscope itemtype="URL" itemid="unique-id">
<!-- Content -->
</element>
Example
Here is an example showing the usage of the itemid
attribute to represent structured data for a book:
- Title
- Owls of the Eastern Ice
- Author
- Jonathan C Slaght
- Publication date
<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>
The itemid
attribute is used to give a unique identifier to items within structured data, ensuring proper referencing and linkage across various datasets.
Key Points
- Usage Requirement: The
itemid
attribute must be applied only on elements that also include both theitemscope
anditemtype
attributes. - Identifier Format: While typically a URL, the
itemid
can also use other formats like URNs, depending on the vocabulary defined byitemtype
. - Vocabularies: The value of the
itemtype
attribute determines the structure and processing of the global identifier.
See Also
- All global attributes.
- Other microdata-related attributes:
- itemprop
- itemref
- itemscope
- itemtype
Conclusion
The itemid
attribute provides a unique global identifier for items in structured data, enhancing data linkage and reference. It must be used alongside itemscope
and itemtype
attributes to ensure proper functionality. This attribute is crucial for maintaining consistency and integration across datasets in HTML-based Microdata.
ismap
The ismap attribute in HTML marks an image as part of a server-side image map with clickable areas and is a boolean attribute.
itemprop
The itemprop attribute in HTML is used to define properties within a structured data format (Microdata), offering more context about an item for search engines and other applications.