Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Global attribute

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!

Global attributes are attributes that can be used on all elements (though sometimes without effect on some elements).

A few attributes can be used on any HTML element:

  • dir, lang, style, id, class, tabindex, accesskey, title, hidden, data-*, contextmenu, contenteditable, translate, spellcheck, draggable, dropzone, itemid, itemprop, itemref, itemscope, and itemtype.
  • Both xml:lang and xml:base, deprecated, inherited from the XHTML specifications and kept for compatibility purposes.
  • The multiple aria-* attributes, for improving accessibility.
  • The event handler attributes: 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.

Learn more

文档标签和贡献者

 此页面的贡献者: Andrew_Pfeiffer, kscarfone, teoli
 最后编辑者: Andrew_Pfeiffer,