Common HTML Attributes

The following HTML attributes can be used on almost all tags.

Core Attributes

  • id
  • class
  • title
  • style

Language Attributes

  • dir
  • lang

Keyboard Attributes

  • accesskey
  • tabindex

Event Attributes

These attributes rely on JavaScript. It's worth noting that 10% of internet users either don't have JavaScript functionality, or have turned it off, so try not to use these for anything critical.

  • onclick
  • ondblclick
  • onmousedown
  • onmouseup
  • onmouseover
  • onmousemove
  • onmouseout
  • onkeypress
  • onkeydown
  • onkeyup