HTML and CSS Reference
In-Depth Information
New Attribute
Description
Defines the accelerator key to be used for keyboard access to an element.
accesskey
contenteditable
When set to true , the browser should allow the user to edit the content of
the element. Does not specify how the changed content is saved.
contextmenu
Defines the DOM id of the menu element to serve as a context menu for
the element the attribute is defined on.
data- X
Specifies user-defined metadata that may be put on tags without concern of
collision with current or future attributes. Use of this type of attribute avoids
the common method of creating custom attributes or overloading the class
attribute.
When specified, should allow the element and its content to be dragged.
draggable
hidden
Under HTML5, all elements may have hidden attribute which when placed
indicates the element is not relevant and should not be rendered. This
attribute is similar to the idea of using the CSS display property set to a
value of none .
Sets a global identifier for a microdata item. This is an optional attribute, but
if it is used, it must be placed in an element that sets both the itemscope
and itemtype attributes. The value must be in the form of a URL.
itemid
Adds a name/value pair to an item of microdata. Any child of a tag with an
itemscope attribute can have an itemprop attribute set in order to add a
property to that item.
itemprop
itemref
Specifies a list of space-separated elements to traverse in order to find
additional name/value pairs for a microdata item. By default, an item
only searches the children of the element that contains the itemscope
attribute. However, sometimes it does not make sense to have a single
parent item if the data is intermingled. In this case, the itemref attribute
can be set to indicate additional elements to search. The attribute is
optional, but if it is used, it must be placed in an element that sets the
itemscope attribute.
itemscope
Sets an element as an item of microdata (see “Microdata” later in the
chapter).
itemtype
Defines a global type for a microdata item. This is an optional attribute,
but if it is used, it must be placed in an element that sets the itemscope
attribute. The value must be in the form of a URL.
spellcheck
Enables the spell checking of an element. The need for this attribute globally
may not be clear until you consider that all elements may be editable at
page view time with the contenteditable attribute.
tabindex
Defines the element-traversal order when the keyboard is used for navigation.
T ABLE 2-6 Key Attributes Added by HTML5
 
Search WWH ::




Custom Search