B. HTML5 Global Attributes
B
HTML5 Global Attributes
The following attributes may be used with any HTML element.
|
Attribute |
Values |
Description |
accesskey |
|
Assigns an access key (shortcut key command) to the link. Access keys are also used for form fields. Users may access the element by pressing Alt-<key> (PC) or Ctrl-<key> (Mac). Example: |
class |
|
Assigns one or more classification names to the element. Multiple values are separated by spaces. |
contenteditable |
| |
Indicates the user can edit the element. If the value is an empty string, it is the same as “true.” By default, the element inherits the edit setting from its parent. |
dir |
| | |
Specifies the inline text direction of the element (“left to right” or “right to left”) and scopes bidirectional reordering, isolating the text from influencing surrounding content. When set to , it uses the first letter to determine direction. |
draggable |
| false |
A value indicates the element is draggable in the UI (an event configured with JavaScript), meaning the user can move it by clicking and holding it, and then moving it to a new position in the window. |
hidden |
In HTML, list value only: In XHTML, include attribute name: |
Prevents the element and its descendants from being rendered in the user agent (browser). Any scripts or form controls in hidden sections will still execute ... |