HTML and CSS Reference
In-Depth Information
The next attribute, tabindex , is possibly more useful. Press the Tab key repeatedly
on your keyboard while on a web page, and you'll see different page elements become
highlighted. This is a common way to access elements of a web page using the keyboard,
which may be particularly familiar when filling out a web form. The tabindex attrib-
ute, when set on a number of different elements (beginning at 1 and incrementing by 1
on each element), determines the order that presses of the Tab key will move through
the different elements, with lower numbers accessed first, for example:
<li><a href="first.html" tabindex="1">First Item Act-
<li><a href="third.html" tabindex="3">Third Item Act-
<li><a href="second.html" tabindex="2">Second Item Act-
On presses of the Tab key, the first item in the list would be activated, followed by the
last item and lastly the middle item. Obviously, in a list such as this, it would make more
usability sense to have them activate in the same order as the list, but this demonstrates
how the order can be customized using tabindex .
The title attribute provides advisory information for an element. Often this is seen
in the form of a tool tip when hovering over a link, form input field, or abbreviation or
acronym. Here's an example:
<a href="" title="World Wide Web Consorti-
This will show a tool tip that shows “World Wide Web Consortium” when hovering
over the link text “W3C” ( Figure 2-2 ).
Search WWH ::

Custom Search