This page is describing the HTML5 global attributes.
To review the rest of global and other HTML attributes, refer to the http://brenkoweb.com/tutorials/html/html-attributes.
Attribute characteristics and purpose:
HTML5
contenteditable attribute:
- decides if the content of an element will be editable or not
contextmenu attribute:
- describes a context menu for an element, appearing after clicking with a right-clicks
data-* attribute:
- stores private custom data to the page or application
draggable attribute:
- decides whether an element will be draggable or not
dropzone attribute:
- in combination (or without) the attribute draggable defines if the dragged data will be moved, copied, or linked when dropped
hidden attribute:
- declares an element irrelevant
spellcheck attribute:
- instructs an user agent (a browser) to have an element's spelling and grammar checked or not
translate attribute:
- instructs an user agent (a browser) to have an element translated or not
NOTE: The linked attirbutes below were introduced in previous version(s) of HTML.
HTML4.01 and older
accesskey attribute:
- defines an access key (a single character) that after being pressed gives a focus to an element
class attribute:
- assigns a class name to an element; any number of elements may share the same class name or names
dir attribute:
- specifies the direction of the text
id attribute:
- dedicates a name to an element and must be unique in a document
lang attribute:
- helps browsers and search engines in various ways (better detection of cultural practices), helps speech synthesizers, helps spelling and grammar checkers, etc...
style attribute:
- specifies inline styles information for an element
tabindex attribute:
- defines order in which elements get focused on during tabbing navigation
title attribute:
- description or summary of an element
Examples
Example with contextmenu attribute
Example with contenteditable attribute:
Example of data-* attribute:
Example with hidden attribute:
Spellcheck attribute example:
Comments
No comments have been made yet.
Please login to leave a comment. Login now