--- title: 전역 특성 slug: Web/HTML/Global_attributes tags: - Attribute - HTML - Reference - Web - 특성 translation_of: Web/HTML/Global_attributes ---
전역 특성(Global attributes)은 모든 HTML에서 공통으로 사용할 수 있는 특성입니다. 그러나 일부 요소에는 아무런 효과도 없을 수 있습니다.
전역 특성은 모든 HTML 요소에 지정할 수 있으며, 심지어 표준에 명시되지 않은 요소에도 지정할 수 있습니다. 이는, 비표준 요소를 사용하는 순간 문서가 HTML5를 준수하지 않음에도 불구하고, 비표준 요소 역시 전역 특성을 허용해야 함을 의미합니다. 예를 들어, HTML5를 준수하는 브라우저라면, <foo>라는 요소는 유효하지 않지만 그래도 <foo hidden>...</foo>는 화면에 나타내지 않을 것입니다.
기본 HTML 전역 특성 외에 아래와 같은 전역 특성도 존재합니다.
aria-* 특성은 접근성 향상을 위해 사용됩니다.onabort, onautocomplete, onautocompleteerror, onblur, oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncontextmenu, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onsort, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting.off 또는 none, 대소문자 자동 변환이 발생하지 않음 (모든 글자가 기본값 소문자)on 또는 sentences, 각 문장의 첫 글자를 대문자로 변환, 나머지 글자는 기본값 소문자words, 각 단어의 첫 글자를 대문자로 변환, 나머지 글자는 기본값 소문자characters, 모든 글자의 기본값이 대문자hidden 특성을 가진 요소를 렌더링 하지 않습니다.참고: item* 특성은 WHATWG HTML Microdata feature의 일부입니다.
itemprop 특성을 명시할 수 있습니다.itemscope 특성을 가진 요소에 속하지 않는 특성들(properties)은 itemref를 사용하여 item에 연결할 수 있습니다. 여기에는 문서 내의 다른 위치에 있는 추가적인 특성을 갖는 요소 id(itemids 가 아닌)목록이 제공됩니다.itemscope은 (일반적으로) {{htmlattrxref("itemtype")}}과 같이 사용하여 블록에 포함된 HTML이 특정 item에 대한 것임을 나타냅니다. itemscope은 item을 생성하고 그 item에 연결된 itemtype의 범위를 정의합니다. itemtype은 item과 특성 컨텍스트를 설명하는 (schema.org와 같은) 어휘(vocabulary)에 대한 유효한 URL입니다.itemprops (item properties)을 정의하는 데 사용할 단어의 URL을 지정합니다. itemscope은 데이터 구조 내에서 itemtype에 의해 설정된 어휘가 활성화되는 범위를 설정하는 데 사용됩니다.slot 특성을 가진 요소는 {{htmlattrxref("name", "slot")}} 특성의 값이 해당 slot 특성의 값과 일치하는 {HTMLElement("slot")}} 요소가 생성한 슬롯에 할당됩니다.0 means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention;| Specification | Status | Comment |
|---|---|---|
| {{SpecName("HTML WHATWG", "dom.html#global-attributes", "Global attributes")}} | {{Spec2("HTML WHATWG")}} | |
| {{SpecName("CSS Shadow Parts", "#exposing")}} | {{Spec2("CSS Shadow Parts")}} | Added the part and exportparts global attributes. |
| {{SpecName("HTML5.2", "dom.html#global-attributes", "Global attributes")}} | {{Spec2("HTML5.2")}} | Snapshot of {{SpecName("HTML WHATWG")}}. From {{SpecName("HTML5.1")}}, itemid, itemprop, itemref, itemscope, and itemtype have been added. |
| {{SpecName("HTML5.1", "dom.html#global-attributes", "Global attributes")}} | {{Spec2("HTML5.1")}} | Snapshot of {{SpecName("HTML WHATWG")}}. From {{SpecName("HTML5 W3C")}}, contextmenu, draggable, dropzone, and spellcheck have been added. |
| {{SpecName("HTML5 W3C", "dom.html#global-attributes", "Global attributes")}} | {{Spec2("HTML5 W3C")}} | Snapshot of {{SpecName("HTML WHATWG")}}. From {{SpecName("HTML4.01")}}, the concept of global attributes is introduced and the dir, lang, style, id, class, tabindex, accesskey, and title are now true global attributes.xml:lang which was initially part of XHTML, is now also part of HTML.hidden, data-*, contenteditable, and translate have been added. |
| {{SpecName("HTML4.01")}} | {{Spec2("HTML4.01")}} | There are no global attributes defined. Several attributes that will become global attributes in subsequent specifications are defined on a subset of elements.class and style are supported on all elements but {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("head")}}, {{HTMLElement("html")}}, {{HTMLElement("meta")}}, {{HTMLElement("param")}}, {{HTMLElement("script")}}, {{HTMLElement("style")}}, and {{HTMLElement("title")}}.dir is supported on all elements but {{HTMLElement("applet")}}, {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("bdo")}}, {{HTMLElement("br")}}, {{HTMLElement("frame")}}, {{HTMLElement("frameset")}}, {{HTMLElement("iframe")}}, {{HTMLElement("param")}}, and {{HTMLElement("script")}}.id is supported on all elements but {{HTMLElement("base")}}, {{HTMLElement("head")}}, {{HTMLElement("html")}}, {{HTMLElement("meta")}}, {{HTMLElement("script")}}, {{HTMLElement("style")}}, and {{HTMLElement("title")}}.lang is supported on all elements but {{HTMLElement("applet")}}, {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("br")}}, {{HTMLElement("frame")}}, {{HTMLElement("frameset")}}, {{HTMLElement("iframe")}}, {{HTMLElement("param")}}, and {{HTMLElement("script")}}.tabindex is only supported on {{HTMLElement("a")}}, {{HTMLElement("area")}}, {{HTMLElement("button")}}, {{HTMLElement("object")}}, {{HTMLElement("select")}}, and {{HTMLElement("textarea")}}.accesskey is only supported on {{HTMLElement("a")}}, {{HTMLElement("area")}}, {{HTMLElement("button")}}, {{HTMLElement("input")}}, {{HTMLElement("label")}}, {{HTMLElement("legend")}} and {{HTMLElement("textarea")}}.title is supported on all elements but {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("head")}}, {{HTMLElement("html")}}, {{HTMLElement("meta")}}, {{HTMLElement("param")}}, {{HTMLElement("script")}}, and {{HTMLElement("title")}}. |
{{Compat("html.global_attributes")}}