From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- .../web/html/global_attributes/itemref/index.html | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 files/ko/web/html/global_attributes/itemref/index.html (limited to 'files/ko/web/html/global_attributes/itemref/index.html') diff --git a/files/ko/web/html/global_attributes/itemref/index.html b/files/ko/web/html/global_attributes/itemref/index.html new file mode 100644 index 0000000000..3b9f63afea --- /dev/null +++ b/files/ko/web/html/global_attributes/itemref/index.html @@ -0,0 +1,95 @@ +--- +title: itemref +slug: Web/HTML/Global_attributes/itemref +tags: + - Global attribute + - HTML + - HTML Microdata + - Reference +translation_of: Web/HTML/Global_attributes/itemref +--- +
{{HTMLSidebar("Global_attributes")}}
+ +

itemref 전역 특성을 사용하면 {{htmlattrxref("itemscope")}} 특성을 가진 요소 바깥의 속성도 아이템과 연결할 수 있습니다.

+ +

itemref 특성에는 문서 내 다른 요소의 {{htmlattrxref("id")}} 목록({{htmlattrxref("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>
+
+ +

구조화 데이터

+ +

(JSON-LD 형식)

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

결과

+ +

{{EmbedLiveSample('예제')}}

+ +

명세

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{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