HTML Global Attributes
- Previous Page HTML Browser Support
- Next Page HTML Events
HTML Global Attributes
Global attributes are attributes that can be used with all HTML elements.
HTML Global Attributes
Attribute | Description |
---|---|
accesskey | Define the shortcut key to activate the element. |
class | Define one or more class names of the element (refer to the class in the style sheet). |
contenteditable | Define whether the content of the element is editable. |
contextmenu | Define the context menu of the element. The context menu is displayed when the user clicks the element. |
data-* | Used to store private custom data for the page or application. |
dir | Define the text direction of the content within the element. |
draggable | Define whether the element is draggable. |
dropzone | Define whether to copy, move, or link during the drag and drop of the dragged data. |
enterkeyhint | Define the text of the enter key on the virtual keyboard. |
hidden | Define that the element is no longer or not relevant. |
id | Define the unique id of the element. |
inert | Specify that the browser should ignore this part. |
inputmode | Define the mode of the virtual keyboard. |
lang | Define the language of the element's content. |
popover | Define the popover element. |
spellcheck | Specify whether to perform spelling and grammar checking on the element. |
style | Define the inline CSS style of the element. |
tabindex | Specifies the tab key order of the element. |
title | Specifies additional information about the element. |
translate | Specifies whether the element content should be translated. |
- Previous Page HTML Browser Support
- Next Page HTML Events