English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML reference manual

HTML tag大全

HTML Global Attributes

Global attributes: can be used to configure the common behavior of all elements, such attributes are called global attributes, and can be used on any element. Local attributes: some elements can specify their own attributes, such attributes are called local attributes. For example, the link element has the local attributes href, rel, hreflang, media, type, sizes, and these six.

AttributeDescription
accesskeySets the keyboard shortcut to access the element
classSpecifies the class name (classname) of the element
contenteditableHTML5Specifies whether the content of an element is editable
contextmenuHTML5Specifies the context menu of an element. When the user right-clicks the element, a context menu appears
data-*HTML5Used to store custom data for the page
dirSets the text direction of the content within an element.
draggableHTML5Specifies whether an element can be dragged
dropzoneHTML5Specifies whether to copy, move, link, or delete data
hiddenHTML5The hidden attribute specifies that the element is hidden.
idSpecifies the unique id of the element
langSets the language code for the content of the element
spellcheckHTML5Checks if there are spelling errors in the element
styleSets the inline style (inline style) for the element
tabindexSets the tabbing order for the element.
titleSpecifies additional information for the element (which can be displayed in a tooltip)
translateHTML5Specifies whether the value of an element needs to be translated when the page is loaded