Adding Keyboard Shortcuts

Keyboard shortcuts let your visitors select and activate links without using a mouse.

To add a keyboard shortcut to a form element:

1.
Inside the form element’s tag, type accesskey=".
2.
Type the keyboard shortcut (any letter or number).
3.
Type the final ".
4.
If desired, add information about the keyboard shortcut to the text so that the visitor knows that it exists.
Figure 17.56. Keyboard shortcuts can be especially helpful on mobile devices.

Figure 17.57. Pressing Ctrl-T (Alt-T on Windows) puts the cursor in the comments box.

✓ Tips

  • Keyboard shortcuts are case-insensitive.

  • On Windows systems, to invoke the ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.