이 글은 기술 검토가 필요합니다. 도울을 줄 수 있는 방법을 살펴보세요.
이 글은 편집 검토가 필요합니다. 도울을 줄 수 있는 방법을 살펴보세요.
이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!
The global attribute itemref
Properties that are not descendants of an element with the itemscope
attribute can be associated with the item using an itemref
. itemref
provides a list of element id's (not itemid
s) with additional properties elsewhere in the document.
The itemref
attribute can only be specified on elements that have an itemscope
attribute specified.
Note: the itemref
attribute is not part of the microdata data model. It is merely a syntactic construct to aid authors in adding annotations to pages where the data to be annotated does not follow a convenient tree structure. For example, it allows authors to mark up data in a table so that each column defines a separate item while keeping the properties in the cells.
Example
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>
Structured data
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 |
Result
Specifications
Specification | Status | Comment |
---|---|---|
itemref |
WG Note - No longer being actively developed |
Browser compatibility
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) |