目录搜索
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
文字

全局属性itemref属性(不是具有该itemscope属性的元素的后代)可以使用一个与该项目相关联itemrefitemref提供元素标识符(不是itemid)的列表,以及文档中其他位置的其他属性。

itemref属性只能在具有指定itemscope属性的元素上指定。

注意:itemref属性不是微数据数据模型的一部分。它仅仅是一种语法结构,可以帮助作者向注释数据不遵循方便的树结构的页面添加注释。例如,它允许作者标记表中的数据,以便每个列都定义一个单独的项目,同时保留单元格中的属性。

示例

HTML

<div itemscope id="amanda" itemref="a b"></div><p id="a">Name: <span itemprop="name">Amanda</span> </p><div id="b" itemprop="band" itemscope itemref="c"></div><div id="c">    <p>Band: <span itemprop="name">Jazz Band</span> </p>    <p>Size: <span itemprop="size">12</span> players</p></div>

结构化数据

id's

itemscope

itemref


(itemprop name)

(itemprop value)

id=amanda

itemscope

itemref=a,b




id=a



itemprop

name

Amanda

id=b

itemscope

itemref=c


band


id=c



itemprop

Band

Jazz Band



itemprop

Size

12


结果

规范

规范

状态

评论

itemref


WG注意事项 - 不再积极发展

浏览器兼容性

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)

上一篇:下一篇: