HTML5 Global Attributes


The global attributes are supported by all HTML 5 elements (with a few exceptions).

HTML5 Global Attributes

New : New global attributes in HTML5.
AttributeValueDescription
accesskeycharacterSpecifies a shortcut key to access an element
classclassnameRefers to a class specified in a style sheet
contenteditableNewtrue
false
inherit
Specifies whether a user can edit the content of an element or not
contextmenuNewmenu_idSpecifies a context menu for an element. The value must be the id of a <menu> element
dirltr
rtl
auto
Specifies the text direction for the content in an element
draggableNewtrue
false
auto
Specifies whether a user is allowed to drag an element or not
dropzoneNewcopy
move
link
Specifies what happens when dragged items/data is dropped in the element
hiddenNewhiddenSpecifies that an element should be hidden
ididSpecifies a unique id for an element
langlanguage_codeSpecifies the language of the element's content
spellcheckNewtrue
false
Specifies if the element must have its spelling and grammar checked
stylestyle_definitionsSpecifies an inline style for an element
tabindexnumberSpecifies the tab order of an element
titletextSpecifies extra information about an element

Leave a Reply