HTML Global Attributes

The HTML global attributes below can be used on any HTML tag/element. HTML attributes give elements meaning and perspective.

Global Attribute

Description

accesskey Indicates a shortcut key to activate/focus an element
class Refers to a classname in the style sheet
contenteditable Indicates whether the content of the element is allowed to be edited or not
contextmenu Specifies a context menu for the menu and this context menu will appear whenever a user right-clicks on the element
dir Indicates the direction of text of the content in the element
draggable Indicates that the element is draggable or not
dropzone Indicates whether the dragged data will be copied, linked or moved after dropping
hidden Indicates that the element in relevant or not
id Gives a unique id to the element
lang Indicates the language for the content in the element
spellcheck Indicates whether the element’s content should have spelling and grammar check or not
style Indicates the inline CSS Style for element
tabindex Indicates the tabbing index for element
title Indicates the extra information about the element
translate Indicates whether an element’s value are to be translated when the page is localized, or not.