HTML5 Global Attributes
A number of attributes are shared by all elements in HTML5 and are referred to collectively as the Global Attributes:
accesskey="character"Assigns an access key (shortcut key command) that activates or focuses the element. The value is a single character. Users may access the element by hitting Alt-<key> (PC) or Ctrl-<key> (Mac).
class="text string"Assigns one or more classification names to the element.
contenteditable="true|false"Not in HTML 4.01. Indicates the user can edit the element. This attribute is already well supported in current browser versions.
contextmenu="id of menu element"Not in HTML 4.01. Specifies a context menu that applies to the element. The context menu must be requested by the user, for example, by a right-click.
dir="ltr|rtl|auto"Specifies the direction of the element.
ltrindicates left to right;rtlindicates right to left; andautoindicates that direction should be determined programmatically.draggable="true|false"Not in HTML 4.01. Indicates the element is draggable, meaning it can be moved by clicking and holding on it, and then moving it to a new position in the window.
dropzone="copy|move|link|string:text string type|file:file type"Not in HTML 4.01. Indicates what happens when a data is dragged onto the element and what kind of data to accept.
copyresults in a copy of the dragged data;movemoves the data to a new location; andlinkresults in a link to the original data. Includingstring:text/plainallows it to accept any text ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access