blob: 3a1a9f19e5273378a1f70e144e277079c71656a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
---
title: itemref
slug: Web/HTML/Global_attributes/itemref
tags:
- Attribute
- Global attribute
- HTML
- Microdata
- Reference
translation_of: Web/HTML/Global_attributes/itemref
---
<div>{{HTMLSidebar("Global_attributes")}}</div>
<p>L'<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes">atribut global</a> <strong>itemref</strong> Les propietats que no són descendents d'un element amb l'atribut <code>itemscope</code> es poden associar amb l'element utilitzant una <code><strong>itemref</strong></code>. <code>itemref</code> proporciona una llista d'elements id's (no Itemids) amb propietats addicionals en qualsevol lloc del document.</p>
<p><span id="result_box" lang="ca"><span>L'atribut</span> <code><span>itemref</span></code> <span>només</span> <span>es</span> <span>pot</span> <span>especificar</span> <span>en elements que</span> <span>tinguin un</span> <span>atribut</span> <code><span>itemscope</span></code> <span>especificat.</span></span></p>
<p class="note"><strong>Nota: </strong>l'atribut <code>itemref</code> no és part del model de dades microdata. No és més que una construcció sintàctica per ajudar els autors a afegir anotacions a les pàgines en què les dades anotades no segueixen una estructura d'arbre convenient. Per exemple, es permet als autors el marcatge de dades en una taula de manera que cada columna defineix un element a part, mantenint les propietats de les cel·les.</p>
<h2 id="Exemple">Exemple</h2>
<h3 id="HTML">HTML</h3>
<pre class="brush: 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>
</pre>
<h3 id="Estructuració_de_les_dades"><span class="short_text" id="result_box" lang="ca"><span>Estructuració de les dades</span></span></h3>
<table class="standard-table">
<tbody>
<tr>
<th>id's</th>
<th>itemscope</th>
<th>itemref</th>
<th> </th>
<th>(itemprop name)</th>
<th>(itemprop value)</th>
</tr>
<tr>
<td>id=amanda</td>
<td>itemscope</td>
<td>itemref=a,b</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>id=a</td>
<td> </td>
<td> </td>
<td>itemprop</td>
<td>name</td>
<td>Amanda</td>
</tr>
<tr>
<td>id=b</td>
<td>itemscope</td>
<td>itemref=c</td>
<td> </td>
<td>band</td>
<td> </td>
</tr>
<tr>
<td colspan="1" rowspan="2">id=c</td>
<td> </td>
<td> </td>
<td>itemprop</td>
<td>Band</td>
<td>Jazz Band</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>itemprop</td>
<td>Size</td>
<td>12</td>
</tr>
</tbody>
</table>
<h3 id="Resultat">Resultat</h3>
<p>{{EmbedLiveSample('Example', '', '', '', 'Web/HTML/Global_attributes/itemref')}}</p>
<h2 id="Especificacions">Especificacions</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Especificació</th>
<th scope="col">Estat</th>
<th scope="col">Comentari</th>
</tr>
<tr>
<td><code><a href="https://html.spec.whatwg.org/multipage/microdata.html#items">itemref</a></code></td>
<td> </td>
<td>WG Nota - <span class="short_text" id="result_box" lang="ca"><span>Ja</span> <span>no s'està</span> <span>desenvolupant</span> <span>activament</span></span></td>
</tr>
</tbody>
</table>
<h2 id="Navegadors_compatibles">Navegadors compatibles</h2>
<p>{{CompatibilityTable}}</p>
<div id="compat-desktop">
<table class="compat-table">
<tbody>
<tr>
<th>Característica</th>
<th>Chrome</th>
<th>Firefox (Gecko)</th>
<th>Internet Explorer</th>
<th>Opera</th>
<th>Safari</th>
</tr>
<tr>
<td>Suport bàsic</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
</tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table">
<tbody>
<tr>
<th>Característica</th>
<th>Android</th>
<th>Chrome for Android</th>
<th>Firefox Mobile (Gecko)</th>
<th>IE Mobile</th>
<th>Opera Mobile</th>
<th>Safari Mobile</th>
</tr>
<tr>
<td>Suport bàsic</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatVersionUnknown}}</td>
</tr>
</tbody>
</table>
</div>
<h2 id="Veure">Veure</h2>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes">Altres atributs globals diferents</a></li>
<li>Altres atributs globals relacionats amb microdata:
<ul>
<li>{{htmlattrxref("itemid")}}</li>
<li>{{htmlattrxref("itemprop")}}</li>
<li>{{htmlattrxref("itemref")}}</li>
<li>{{htmlattrxref("itemscope")}}</li>
<li>{{htmlattrxref("itemtype")}}</li>
</ul>
</li>
</ul>
<div class="s3gt_translate_tooltip" id="s3gt_translate_tooltip" style="position: absolute; left: 106px; top: 156px; opacity: 0;">
<div class="s3gt_translate_tooltip_mini" id="s3gt_translate_tooltip_mini_logo" title="Traducir texto seleccionado"> </div>
<div class="s3gt_translate_tooltip_mini" id="s3gt_translate_tooltip_mini_sound" title="Reproducir"> </div>
<div class="s3gt_translate_tooltip_mini" id="s3gt_translate_tooltip_mini_copy" title="Copy text to Clipboard"> </div>
</div>
|