HTML and CSS Reference
This attribute uses a number to identify the object's position in the tabbing order for
keyboard navigation using the TAB key. While tabindex is defined for some elements as
part of W3C standards, IE 5.5 added support for this attribute to a wider range of elements.
Under IE 5.5 or higher, this focus can be disabled with the hidefocus attribute.
This proprietary Microsoft attribute can be used to prevent content displayed from being
selected. Testing suggests that this might not work consistently. Values are off (selection
permitted) and on (selection not allowed).
This attribute specifies additional vertical space, in pixels, to be reserved above and below
an embedded object, image, iframe, applet, or any other embeddable item.
This attribute specifies the width, in pixels, needed by an embedded object, image, iframe,
applet, or any other embeddable item.
Common HTML5 Attributes Reference
HTML5 introduces a number of common attributes to many elements. Some of these have
been discussed in the previous section, while others are all new. For the sake of avoiding
repetition in entries, each is discussed here and then shown only in the syntax list later. As
you were warned at the beginning of the chapter, this information is based upon the draft
HTML5 specification and is subject to change. Check the HTML5 specification at www
.w3.org/TR/html5 for updates and changes. Further note that while some of these attributes
are already implemented in Internet Explorer (such as contenteditable ) or other modern
browsers, many are not yet implemented, so their usage may be somewhat speculative.
N OTE One interesting aspect of these attributes is that while they are defined in the HTML5
specification on all elements, their meaning is unclear or suspect in certain cases. For example,
spell checking images or using interface conventions like accelerators or context menus on
nonvisible elements, particularly those in the head (like meta ), simply don't make sense. What
the spec says and what will actually be implemented or used will likely vary.
Under HTML5, the accesskey attribute specifies a keyboard navigation accelerator for the
element. The main differences between this and the commonly supported attribute are that
it can be applied, in theory, to any element in the specification and that it takes a space-
separated list of key choices. For example,
<input type="button" value="Show Author" accesskey="t a p">