In addition to the element specific attributes, the HTML5 defines few attributes that are common to all elements. These attributes may be specified on all elements, with some exceptions where it is not relevant, such as elements found inside the head section of the document, e.g. base, script, title etc.

Global Attributes in HTML5

AttributeValueDescription
accesskeyshortcut keySpecifies a keyboard shortcut to activate or focus the element.
classclassnameAssigns a class name or space-separated list of class names to an element.
contenteditabletrue falseIndicates whether the content of an element is editable by the user or not.
contextmenumenu-idSpecifies a context menu for an element. A context menu is a menu that appears when the user clicks the right mouse button on the element.
data-*dataSpecified on any HTML element, to store custom data specific to the page.
dirltr rtlSpecifies the base direction of directionality of the element's text.
draggabletrue falseSpecifies whether an element is draggable or not.
dropzonecopy move linkSpecifies whether the dragged data is copied, moved, or linked, when dropped.
hiddenhiddenIndicates that the element is not yet, or is no longer, relevant.
idnameSpecifies a unique identifier (ID) for an element which must be unique in the whole document.
langlanguage-codeSpecifies the primary language for the element's text content.
spellchecktrue falseSpecifies whether the element may be checked for spelling errors or not.
stylestyleSpecifies inline style information for an element.
tabindexnumberSpecifies the tabbing order of an element.
titletextProvides advisory information related to the element. It would be appropriate for a tooltip.
translateyes noSpecifies whether the text content of an element should be translated or not.
xml:langlanguage-codeSpecifies the primary language for the element's text content, in XHTML documents.