global-attributes
Global attributes
Attributes that may appear on most HTML elements (unless explicitly disallowed).
| Attribute | Meaning |
|---|---|
| accesskey | Shortcut hint (limited usefulness; prefer accessible components). |
| autocapitalize | Virtual keyboard capitalization hints. |
| autofocus | Focus on load (use sparingly). |
| class | Space-separated class tokens for CSS/JS hooks. |
| contenteditable | Whether user may edit inline. |
| data-* | Custom private metadata attributes. |
| dir | Text direction (ltr, rtl, auto). |
| draggable | Drag-and-drop participation. |
| enterkeyhint | Virtual keyboard action label. |
| hidden | Hides element from presentation when true. |
| id | Unique identifier within document. |
| inert | Disables interaction / discovery for subtree. |
| inputmode | Virtual keyboard mode hint. |
| is | Customized built-in element tag name. |
| itemid, itemprop, … | Microdata annotation attributes (itemscope, itemtype, …). |
| lang | Language tag (BCP 47). |
| nonce | CSP nonce for inline scripts/styles. |
| popover | Popover behavior token. |
| slot | Shadow DOM slot assignment. |
| spellcheck | Spell-check hint. |
| style | Inline CSS declarations. |
| tabindex | Focus order participation. |
| title | Advisory information (not a substitute for visible labels). |
| translate | Translation hint. |
ARIA attributes (role, aria-*) extend accessibility when native elements cannot express your UX—prefer built-in semantics first.