Almost all attributes are defined to be used with particular elements. However, some of them are available for use on all HTML elements. These attributes are called – Global Attributes.
accesskey | defines a shortcut key to activate/focus an element. |
class | defines one or more class names for an element (makes a reference to a class in a style sheet). |
contenteditable | defines whether the content of an element is editable or not. |
data-* | allows embedding custom data attributes on all HTML elements. |
dir | defines the text direction of the element’s content. |
draggable | defines whether an element is draggable or not. |
hidden | defines that an element is not yet, or is no longer, relevant. |
id | defines a unique id for an HTML element. |
lang | defines the language of the element’s content. |
spellcheck | defines whether the element is to have its spelling and grammar checked or not. |
style | defines a style for an element. |
tabindex | defines the tab order of an element. |
title | defines extra information about an element. |
translate | defines whether the content of an element should be translated. |
Read also: