From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/html/global_attributes/itemref/index.html | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 files/ja/web/html/global_attributes/itemref/index.html (limited to 'files/ja/web/html/global_attributes/itemref') diff --git a/files/ja/web/html/global_attributes/itemref/index.html b/files/ja/web/html/global_attributes/itemref/index.html new file mode 100644 index 0000000000..7d40896d1d --- /dev/null +++ b/files/ja/web/html/global_attributes/itemref/index.html @@ -0,0 +1,98 @@ +--- +title: itemref +slug: Web/HTML/Global_attributes/itemref +tags: + - HTML + - HTML マイクロデータ + - Reference + - グローバル属性 + - マイクロデータ + - 属性 +translation_of: Web/HTML/Global_attributes/itemref +--- +
{{HTMLSidebar("Global_attributes")}}
+ +

グローバル属性itemref プロパティは、 itemscope 属性を持つ要素の子孫でない場合、 itemref を使用してアイテムと関連付けができます。

+ +

itemref は文書内のどこかにある追加のプロパティがある要素の ID (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>
+
+ +

構造化データ

+ +

(in JSON-LD format)

+ +
{
+  "@id": "amanda",
+  "name": "Amanda",
+  "band": {
+    "@id": "b",
+    "name": "Jazz Band",
+    "size": 12
+  }
+}
+
+ +

結果

+ +

{{EmbedLiveSample('Example', '', '', '', 'Web/HTML/Global_attributes/itemref')}}

+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書策定状況コメント
{{SpecName('HTML Microdata', "#dfn-itemref", "itemref")}}{{Spec2('HTML Microdata')}} 
{{SpecName('HTML WHATWG', "microdata.html#attr-itemref", "itemref")}}{{Spec2('HTML WHATWG')}} 
+ +

ブラウザーの対応

+ + + +

{{Compat("html.global_attributes.itemref")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf