Global Attributes

itemref

itemref 전역 특성을 사용하면 itemscope 특성을 가진 요소 바깥의 속성도 아이템과 연결할 수 있습니다. itemref 특성에는 문서 내 다른 요소의 id 목록(itemid...

· 1min read · 40 views

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

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>

구조화 데이터

(JSON-LD 형식)

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

같이 보기

Related Docs

Global Attributes

accesskey

accesskey 전역 특성은 현재 요소에 대한 키보드 단축키를 생성할 때 사용할 힌트를 제공합니다. accesskey 속성의 값은 반드시 출력 가능한 단일 문자(키보드로...

1min read 37 views
Global Attributes

autocapitalize

autocapitalize 전역 특성은 사용자가 입력하거나 수정하는 텍스트를 자동으로 대문자로 바꾸는 방식을 제어하는 열거형 특성입니다. 가능한 값은 다음과 같습니...

1min read 37 views
Global Attributes

autofocus

autofocus 전역 특성은 페이지 로드 시 또는 <dialog> 표시 시 해당 요소가 자동으로 포커스를 받아야 함을 나타내는 불리언 특성입니다. <input name="q" autof...

1min read 37 views
Global Attributes

class

class 전역 특성은 공백으로 구분한 요소 클래스의 목록으로, 대소문자를 구분하지 않습니다. 클래스는 CSS나 JavaScript에서 클래스 선택자나 DOM 메서드의 doc...

1min read 35 views

Comments (0)

No comments yet. Be the first to comment!

Leave a Comment

로그인 후 댓글을 남길 수 있습니다.