Global HTML attributes

HTML attributes for HTML tags supports global attributes. These attributes can be used with any tags. Global means for all.

Sr. No. Attribute Name Description
1 accesskey Use to include a key to access the element. The value for this can be any string.
2 class used to include class identifier to html elements. This identifies can be use to get the element give styling and script. The value for this csn be any string.
3 contenteditable Used to set whether the content element is editable or not. This contains boolean value true/false.
4 contextmenu used to specify the context menu for the element. The value for this is the ID of the menu.
5 dir used to specify the direction of the text. The value for this are from ltr(left to right), rtl(right to left) and auto
6 draggable used to specify whether the user is allowed to drag the element or not. the value for this can be true, false and auto.
7 dropzone Used to specify the element when dragged and drop to somewhere else. The value for this copy, move, link, any string.
8 hidden Use to specify that the element is not yet or no longer relevant. The value for this is hidden.
9 id used to specify the identifier for the element. This can be use for css and javascript.
10 inert Used to show side content for the HTML pages.
11 lang Used to specify the language.
12 spellcheck used to specify whether the element have spelling check or not.
13 style Used to define the styling for the element. The value for this are the css codes we use in stylesheets.
14 tabindex used to define the tabbing order of the element. The value for this can be any integer value like 1,2..
15 title used to define the title of the element.
16 translate Used to define whether the element is translated or not. The value for this can be empty string, true/false.