Attribute index

Global attributes

The 31 attributes the WHATWG attribute index lists for all HTML elements. Event handler attributes (onclick and the rest) have their own index in the standard.

Read the definition in the standard ↗
accesskey
Keyboard shortcut to activate or focus element Value: Ordered set of unique space-separated tokens, none of which are identical to another, each consisting of one code point in length
autocapitalize
Recommended autocapitalization behavior (for supported input methods) Value: "on"; "off"; "none"; "sentences"; "words"; "characters"
autocorrect
Recommended autocorrection behavior (for supported input methods) Value: "on"; "off"; the empty string
autofocus
Automatically focus the element when the page is loaded Value: Boolean attribute
class
Classes to which the element belongs Value: Set of space-separated tokens
contenteditable
Whether the element is editable Value: "true"; "false"; "plaintext-only"; the empty string
dir
The text directionality of the element Value: "ltr"; "rtl"; "auto"
draggable
Whether the element is draggable Value: "true"; "false"
enterkeyhint
Hint for selecting an enter key action Value: "enter"; "done"; "go"; "next"; "previous"; "search"; "send"
headingoffset
Offsets heading levels for descendants Value: Valid non-negative integer between 0 and 8
headingreset
Prevents a heading offset computation from traversing beyond the element with the attribute Value: Boolean attribute
hidden
Whether the element is relevant Value: "until-found"; "hidden"; the empty string
id
The element's ID Value: Text*
inert
Whether the element is inert. Value: Boolean attribute
inputmode
Hint for selecting an input modality Value: "none"; "text"; "tel"; "email"; "url"; "numeric"; "decimal"; "search"
itemref
Referenced elements Value: Unordered set of unique space-separated tokens consisting of IDs*
itemscope
Introduces a microdata item Value: Boolean attribute
itemtype
Item types of a microdata item Value: Unordered set of unique space-separated tokens consisting of valid absolute URLs*
lang
Language of the element Value: Valid BCP 47 language tag or the empty string
nonce
Cryptographic nonce used in Content Security Policy checks [CSP] Value: Text
popover
Makes the element a popover element Value: "auto"; "manual"; "hint"; the empty string
slot
The element's desired slot Value: Text
spellcheck
Whether the element is to have its spelling and grammar checked Value: "true"; "false"; the empty string
style
Presentational and formatting instructions Value: CSS declarations*
tabindex
Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation Value: Valid integer
title
Advisory information for the element Value: Text
translate
Whether the element is to be translated when the page is localized Value: "yes"; "no"; the empty string
writingsuggestions
Whether the element can offer writing suggestions or not. Value: "true"; "false"; the empty string