사용자 도구

사이트 도구


wiki:html:html_note:data-_attributes

data-* attributes

  • description : data-* attributes
  • author : 오션
  • email : shlim@repia.com
  • lastupdate : 2022-06-22 Wed


data-* attributes

출처:WHATWG (Web Hypertext Application Technology Working Group)
웹 하이퍼텍스트 애플리케이션 테크놀로지 워킹 그룹
HTML 및 관련 기술을 발전시키는 데 관심이 있는 사람들의 모임(위키백과)

3.2.6.6 Embedding custom non-visible data with the data-* attributes

A custom data attribute is an attribute in no namespace whose name starts with the string "data-", has at least one character after the hyphen, is XML-compatible, and contains no ASCII upper alphas.

Note:
All attribute names on HTML elements in HTML documents get ASCII-lowercased automatically, so the restriction on ASCII uppercase letters doesn't affect such documents.

Custom data attributes are intended to store custom data, state, annotations, and similar, private to the page or application, for which there are no more appropriate attributes or elements.

These attributes are not intended for use by software that is not known to the administrators of the site that uses the attributes. For generic extensions that are to be used by multiple independent tools, either this specification should be extended to provide the feature explicitly, or a technology like microdata should be used (with a standardized vocabulary).

3.2.6.6 data-* 속성을 사용하여 보이지 않는 사용자 정의 데이터 포함 시키기

사용자 정의 데이터 속성은 네임스페이스를 가지지 않으면서 이름이 "data-" 문자열로 시작하는 속성이고, 하이픈 뒤에 적어도 하나의 문자가 있고 XML과 호환되며 ASCII upper alphas를 포함하지 않습니다.

Note: HTML documentsHTML elements에 있는 모든 속성 의 이름은 자동으로 ASCII 소문자가 되므로, ASCII 대문자에 대한 제한은 이러한 문서에 영향을 미치지 않습니다.

사용자 정의 데이터 속성은 사용자 정의 데이터, 상태, 주석을 저장하려고 의도된 것이고, 페이지 또는 애플리케이션에 대해 동종의 비공개되는 것으로, 이는 더 이상 적절한 속성 또는 요소가 없기 때문입니다.

이러한 속성들은 해당 속성을 사용하는 사이트 관리자에게 알려지지 않은 소프트웨어에서 사용하기 위한 것이 아닙니다. 다수의 독립적인 툴에서 사용되는 일반적인 익스텐션의 경우, 이 사양을 확장하여 기능을 명시적으로 제공하거나 마이크로데이터와 같은 기술을 사용해야 합니다(표준화된 어휘 포함).


An ASCII upper alpha is a code point in the range U+0041 (A) to U+005A (Z), inclusive.

A code point is a Unicode code point and is represented as “U+” followed by four-to-six ASCII upper hex digits, in the range U+0000 to U+10FFFF, inclusive. A code point’s value is its underlying number.

/var/services/web/dokuwiki/data/pages/wiki/html/html_note/data-_attributes.txt · 마지막으로 수정됨: 2023/01/13 18:44 (바깥 편집)