HTML and CSS Reference
In-Depth Information
or using class values in a similar manner:
<p id="p1" class="author-Thomas-A.-Powell"> This is a class data example </p>
N OTE Special characters, particularly colons, should not be used in the data- names here. You are
also encouraged to keep the names lowercase for consistency.
This attribute is used to set whether or not an element is draggable. If the attribute is set to
true , the element is draggable. A value of auto sets images and links with an href to be
draggable and all other items to not be draggable. A false value turns off dragging.
<p draggable="true"> Drag me </p>
<p draggable="false"> Sorry no drag </p>
Real integration with elements with draggable attributes requires JavaScript usage (see
Chapter 2 for an example).
This attribute is a Boolean, or presence-based, attribute that does not require a value. If
you're using XHTML5, you should use the value of hidden , as attributes must have values
with XML syntax.
<p hidden> I'm hidden </p>
<p hidden="hidden"> I'm hidden XML syntax style </p>
When this attribute is specified on an element, the element is not currently relevant and
thus the user agent should not render it. The exact meaning of the attribute is a bit unclear.
It would appear to be similar to the semantics of the CSS property display:none , but the
specification hints that elements that are hidden are active and thus it also is somewhat
different from this common construct. Once browsers implement this attribute, the meaning
may be clarified. This attribute was initially called irrelevant in earlier HTML5 drafts.
This attribute is used to set 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.
<div itemscope itemtype=""
<span itemprop="firstname"> Joe </span>
<span itemprop="lastname"> Smith </span>
This attribute is used to add a name/value pair to a microdata item. Any child of a tag with
an itemscope attribute can have an itemprop attribute set in order to add a property to
Search WWH ::

Custom Search