Skip to content
Learn Netverks

global-attributes

Global attributes

Attributes that may appear on most HTML elements (unless explicitly disallowed).

Attribute Meaning
accesskeyShortcut hint (limited usefulness; prefer accessible components).
autocapitalizeVirtual keyboard capitalization hints.
autofocusFocus on load (use sparingly).
classSpace-separated class tokens for CSS/JS hooks.
contenteditableWhether user may edit inline.
data-*Custom private metadata attributes.
dirText direction (ltr, rtl, auto).
draggableDrag-and-drop participation.
enterkeyhintVirtual keyboard action label.
hiddenHides element from presentation when true.
idUnique identifier within document.
inertDisables interaction / discovery for subtree.
inputmodeVirtual keyboard mode hint.
isCustomized built-in element tag name.
itemid, itemprop, …Microdata annotation attributes (itemscope, itemtype, …).
langLanguage tag (BCP 47).
nonceCSP nonce for inline scripts/styles.
popoverPopover behavior token.
slotShadow DOM slot assignment.
spellcheckSpell-check hint.
styleInline CSS declarations.
tabindexFocus order participation.
titleAdvisory information (not a substitute for visible labels).
translateTranslation hint.

ARIA attributes (role, aria-*) extend accessibility when native elements cannot express your UX—prefer built-in semantics first.

← Back to reference index