目录搜索
Attributesaccesskey (attribute)class (attribute)contenteditable (attribute)contextmenu (attribute)data-* (attribute)dir (attribute)draggable (attribute)dropzone (attribute)Global attributeshidden (attribute)id (attribute)itemid (attribute)itemprop (attribute)itemref (attribute)itemscope (attribute)itemtype (attribute)lang (attribute)slot (attribute)spellcheck (attribute)style (attribute)tabindex (attribute)title (attribute)translate (attribute)Elementsaabbraddressareaarticleasideaudiobbasebdibdoblockquotebodybrbuttoncanvascaptioncitecodecolcolgroupdatadatalistdddeldetailsdfndialogdivdldtemembedfieldsetfigcaptionfigurefooterformh1headheaderhrhtmliiframeimginputinput type="button"input type="checkbox"input type="color"input type="date"input type="datetime"-localinput type="email"input type="file"input type="hidden"input type="image"input type="month"input type="number"input type="password"input type="radio"input type="range"input type="reset"input type="search"input type="submit"input type="tel"input type="text"input type="time"input type="url"input type="week"inskbdlabellegendlilinkmainmapmarkmenumenuitemmetameternavnoscriptobjectoloptgroupoptionoutputpparampicturepreprogressqrprtrtcrubyssampscriptsectionselectslotsmallsourcespanstrongstylesubsummarysuptabletbodytdtemplatetextareatfootththeadtimetitletrtrackuulvarvideowbrMiscellaneousAttributesBlock-level elementsCORS enabled imageCORS settings attributesElementInline elementsKinds of HTML contentLink typesMicrodataOptimizing your pages for speculative parsingPreloading contentReferenceSupported media formatsUsing the application cacheObsoleteacronymappletbasefontbigblinkcentercommandcontentdirelementfontframeframesethgroupimageinput type="datetime"isindexkeygenlistingmarqueenextidnoframesplaintextstrikettxmp
文字

itemid全局属性是某个项目的唯一全局标识符。itemid属性只能为既具有元素指定itemscopeitemtype属性。此外,itemid只能在具有itemscope相应属性的元素上指定itemtype或引用支持全局标识符的词汇表。

itemtype全局标识符的确切含义由指定词汇表中该标识符的定义提供。词汇表定义是否有多个具有相同全局标识符的项目可以共存,如果是,则处理具有相同标识符的项目。

注意: Whatwg.org 定义指定itemid必须是 URL 。但是,以下示例正确说明也可以使用 URN 。这种不一致可能反映了 Microdata 规范的不完整性。

例子

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>

结构化数据

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

结果

规范

Specification

Status

Comment

itemid


WG Note - No longer being actively developed

浏览器兼容性

Feature

Chrome

Firefox (Gecko)

Internet Explorer

Opera

Safari

Basic support

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

Feature

Android

Chrome for Android

Firefox Mobile (Gecko)

IE Mobile

Opera Mobile

Safari Mobile

Basic support

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

上一篇:下一篇: