HTML 속성

HTML **HTML 속성**(HTML attribute)은 HTML 요소 유형의 수정자(modifier)이다. (속성(attribute)은 태그의 동작을 제어하기 위해 "여는 태그" 안에 사용되는 특수 용어이다.) 즉, 속성은 요소 유형의 기본 기능을 수정하거나, 아니면 스스로 기능하지 못하는 특정한 요소 유형에 기능을 제공한다. HTML 문법에서 속성은 HTML 시작 태그에 추가된다.
# 개요
HTML 속성은 일반적으로 이름-값 쌍으로 나타나며, 구분은 `=`로 하며 요소의 이름 뒤의 요소의 시작 태그 안에 작성된다. :content to be modified by the tag 여기서 `태그`는 HTML 요소 유형을 명명하고 `속성`은 속성의 이름을 가리키며 지정된 `값`을 설정한다. 이 값은 `'` 또는 `"`로 감쌀 수 있으나 특정한 문자들을 이루는 값들은 HTML에서 인용 부호 없이 남겨둘 수 있다. (XHTML에서는 제외)accessdate=November 16, 2008accessdate=November 16, 2008 속성 값들을 인용 부호 없이 내버려두는 것은 안전하지 않은 것으로 간주된다.url-status=dead
# 표준 속성
{| class="wikitable sortable" !태그 !id !class !style !title !dir !lang !xml:lang !accesskey !tabindex |- !param |id | | | | | | | | |- !head | | | | |dir |lang |xml:lang | | |- !html | | | | |dir |lang |xml:lang | | |- !meta | | | | |dir |lang |xml:lang | | |- !title | | | | |dir |lang |xml:lang | | |- !style | | | |title |dir |lang |xml:lang | | |- !applet |id |class |style |title | | | | | |- !br |id |class |style |title | | | | | |- !frame |id |class |style |title | | | | | |- !frameset |id |class |style |title | | | | | |- !iframe |id |class |style |title | | | | | |- !basefont |id |class |style |title |dir |lang | | | |- !center |id |class |style |title |dir |lang | | | |- !dir |id |class |style |title |dir |lang | | | |- !font |id |class |style |title |dir |lang | | | |- !menu |id |class |style |title |dir |lang | | | |- !s |id |class |style |title |dir |lang | | | |- !strike |id |class |style |title |dir |lang | | | |- !u |id |class |style |title |dir |lang | | | |- !abbr |id |class |style |title |dir |lang |xml:lang | | |- !acronym |id |class |style |title |dir |lang |xml:lang | | |- !address |id |class |style |title |dir |lang |xml:lang | | |- !b |id |class |style |title |dir |lang |xml:lang | | |- !big |id |class |style |title |dir |lang |xml:lang | | |- !blockquote |id |class |style |title |dir |lang |xml:lang | | |- !body |id |class |style |title |dir |lang |xml:lang | | |- !caption |id |class |style |title |dir |lang |xml:lang | | |- !cite |id |class |style |title |dir |lang |xml:lang | | |- !code |id |class |style |title |dir |lang |xml:lang | | |- !col |id |class |style |title |dir |lang |xml:lang | | |- !colgroup |id |class |style |title |dir |lang |xml:lang | | |- !dd |id |class |style |title |dir |lang |xml:lang | | |- !del |id |class |style |title |dir |lang |xml:lang | | |- !dfn |id |class |style |title |dir |lang |xml:lang | | |- !div |id |class |style |title |dir |lang |xml:lang | | |- !dl |id |class |style |title |dir |lang |xml:lang | | |- !dt |id |class |style |title |dir |lang |xml:lang | | |- !em |id |class |style |title |dir |lang |xml:lang | | |- !fieldset |id |class |style |title |dir |lang |xml:lang | | |- !form |id |class |style |title |dir |lang |xml:lang | | |- !hn |id |class |style |title |dir |lang |xml:lang | | |- !h1, h2, h3, h4, h5, h6 |id |class |style |title |dir |lang |xml:lang | | |- !i |id |class |style |title |dir |lang |xml:lang | | |- !img |id |class |style |title |dir |lang |xml:lang | | |- !ins |id |class |style |title |dir |lang |xml:lang | | |- !kbd |id |class |style |title |dir |lang |xml:lang | | |- !li |id |class |style |title |dir |lang |xml:lang | | |- !link |id |class |style |title |dir |lang |xml:lang | | |- !map |id |class |style |title |dir |lang |xml:lang | | |- !noframes |id |class |style |title |dir |lang |xml:lang | | |- !noscript |id |class |style |title |dir |lang |xml:lang | | |- !ol |id |class |style |title |dir |lang |xml:lang | | |- !optgroup |id |class |style |title |dir |lang |xml:lang | | |- !option |id |class |style |title |dir |lang |xml:lang | | |- !p |id |class |style |title |dir |lang |xml:lang | | |- !pre |id |class |style |title |dir |lang |xml:lang | | |- !q |id |class |style |title |dir |lang |xml:lang | | |- !samp |id |class |style |title |dir |lang |xml:lang | | |- !small |id |class |style |title |dir |lang |xml:lang | | |- !span |id |class |style |title |dir |lang |xml:lang | | |- !strong |id |class |style |title |dir |lang |xml:lang | | |- !sub |id |class |style |title |dir |lang |xml:lang | | |- !sup |id |class |style |title |dir |lang |xml:lang | | |- !table |id |class |style |title |dir |lang |xml:lang | | |- !tbody |id |class |style |title |dir |lang |xml:lang | | |- !td |id |class |style |title |dir |lang |xml:lang | | |- !tfoot |id |class |style |title |dir |lang |xml:lang | | |- !th |id |class |style |title |dir |lang |xml:lang | | |- !thead |id |class |style |title |dir |lang |xml:lang | | |- !tr |id |class |style |title |dir |lang |xml:lang | | |- !tt |id |class |style |title |dir |lang |xml:lang | | |- !ul |id |class |style |title |dir |lang |xml:lang | | |- !var |id |class |style |title |dir |lang |xml:lang | | |- !label |id |class |style |title |dir |lang |xml:lang |accesskey | |- !legend |id |class |style |title |dir |lang |xml:lang |accesskey | |- !object |id |class |style |title |dir |lang |xml:lang | |tabindex |- !select |id |class |style |title |dir |lang |xml:lang | |tabindex |- !a |id |class |style |title |dir |lang |xml:lang |accesskey |tabindex |- !area |id |class |style |title |dir |lang |xml:lang |accesskey |tabindex |- !button |id |class |style |title |dir |lang |xml:lang |accesskey |tabindex |- !input |id |class |style |title |dir |lang |xml:lang |accesskey |tabindex |- !textarea |id |class |style |title |dir |lang |xml:lang |accesskey |tabindex |}
## 이벤트 속성
{| class="wikitable sortable" |- !태그 !At !At !At !At !At !At !At !At !At !At !At !At !At !At !At !At !At |- !frameset |onload |onunload | | | | | | | | | | | | | | | |- !body |onload |onunload | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !abbr | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !acronym | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !address | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !b | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !big | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !blockquote | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !caption | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !center | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !cite | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !code | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !col | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !colgroup | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !dd | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !del | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !dfn | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !dir | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !div | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !dl | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !dt | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !em | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !fieldset | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !h1, h2, h3, h4, h5, h6 | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !hr | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !i | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !ins | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !kbd | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !legend | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !li | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !link | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !map | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !menu | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !noframes | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !noscript | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !object | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !ol | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !optgroup | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !option | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !p | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !pre | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !q | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !s | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !samp | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !small | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !span | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !strike | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !strong | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !sub | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !sup | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !table | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !tbody | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !td | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !tfoot | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !th | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !thead | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !tr | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !tt | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !u | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !ul | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !var | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !img | | |onabort |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup | | | | |- !a | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup |onblur |onfocus | | |- !area | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup |onblur |onfocus | | |- !button | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup |onblur |onfocus | | |- !form | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup |onblur |onfocus | | |- !label | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup |onblur |onfocus | | |- !select | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup |onblur |onfocus |onchange | |- !input | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup |onblur |onfocus |onchange |onselect |- !textarea | | | |onclick |ondblclick |onmousedown |onmousemove |onmouseout |onmouseover |onmouseup |onkeydown |onkeypress |onkeyup |onblur |onfocus |onchange |onselect |}