Global attributes may be used with all HTML elements, even those not specified in the HTML standard. Global attributes may not have any effect on some elements.

Global Attributes

accesskey

The accesskey Attribute allows you to specify a keyboard shortcut to focus or activate a specific element.

class

The class global attribute specifies one or more class names for an HTML element.

contenteditable

The contenteditable attribute specifies whether an element should be editable by the user.

dir

The dir Attribute specifies the direction of the element’s text.

draggable

The draggable Attribute specifies whether the element can be dragged either via native browser functionality, or with the Drag and Drop API.

hidden

The hidden attribute is a boolean that specifies that an element is not relevant and should not be displayed by the browser.

id

The id Attribute specifies a unique identifier for an HTML element.

integrity

The integrity Attribute is used with a <script> element to enable a browser (or other user agents) to verify that a fetched resource has not been manipulated.

lang

The lang Attribute specifies the language of an element’s content.

spellcheck

The spellcheck Attribute specifies whether the element should have its spelling and grammar checked.

style

The style Attribute specifies an inline CSS style for an element.

tabindex

The tabindex Attribute specifies that its element can be focused the order it can be tabbed when navigating.

title

The title Attribute specifies additional information about an element, commonly in the form of a tooltip when the mouse hovers over the element.

translate

The translate Attribute specifies whether the element should be translated or not when a page is localized, for example by Google Translate.