HTML 5 Attributes
Below is a complete list of HTML 5 attributes, as we mentioned in our HTML 5 Reference article we will be providing a downloadable HTML 5 Attributes cheat sheet in the coming days.
- 4* The element is defined in HTML 4+
- 5* The element is defined in HTML 5
| Attribute | Value | Description | 4 | 5 |
|---|---|---|---|---|
| accesskey | character | Specifies a keyboard shortcut to access an element | 4 | |
| class | classname | Specifies a classname for an element (used to specify a class in a style sheet) |
4 | 5 |
| contenteditable | true false |
Specifies whether or not a user is allowed to edit the content | 5 | |
| contextmenu | menu_id | Specifies the context menu for an element | 5 | |
| dir | ltr rtl |
Specifies the text direction for the content in an element |
4 | 5 |
| draggable | true false auto |
Specifies whether or not a user is allowed to drag an element | 5 | |
| id | id | Specifies a unique id for an element | 4 | 5 |
| irrelevant | true false |
Specifies whether or not a element is irrelevant. An irrelevant element is not displayed |
5 | |
| lang | language_code | Specifies a language code for the content in an element | 4 | 5 |
| ref | URL / id | Specifies a reference to another document / another part of a document (use only if the template attribute is set) |
5 | |
| registrationmark | reg_mark | Specifies a registration mark for an element | 5 | |
| style | style_definition | Specifies an inline style for an element | 4 | 5 |
| tabindex | number | Specifies the tab order of an element | 4 | 5 |
| template | URL / id | Specifies a reference to another document / another part of the document that should be applied to an element |
5 | |
| title | text | Specifies extra information about an element | 4 | 5 |
The above list is only a Standard Attribute list, if and when more HTML Attributes become available we will update this article.
Related Posts