HTML5 Standard Attributes

The attributes listed below are supported by all HTML 5 tags, with a few exceptions.

HTML5 Standard Attributes

New : New standard attributes in HTML5.

AttributeValueDescription
accesskeycharacterSpecifies a keyboard shortcut to access an element
classclassnameSpecifies a classname for an element (used to specify a class in a style sheet)
contenteditableNewtrue
false
Specifies if the user is allowed to edit the content or not
contextmenuNewmenu_idSpecifies the context menu for an element
data-yourvalueNewvalueAuthor defined attributes. Authors of a HTML document can define their own attributes. Must start with "data-"
dirltr
rtl
Specifies the text direction for the content in an element
draggableNewtrue
false
auto
Specifies whether or not a user is allowed to drag an element
hiddenNewhiddenSpecifies that the element is not relevant. Hidden elements are not displayed
ididSpecifies a unique id for an element
itemNewempty
url
Used to group elements
itempropNewurl
group value
Used to group items
langlanguage_codeSpecifies a language code for the content in an element.Language code reference
spellcheckNewtrue
false
Specifies if the element must have its spelling and grammar checked
stylestyle_definitionSpecifies an inline style for an element
subjectNewidSpecifies the element's corresponding item
tabindexnumberSpecifies the tab order of an element
titletextSpecifies extra information about an element

Comments