Course Technology Logo
     
Home 
Tutorials 
 Tutorial 1
 Tutorial 2
 Tutorial 3
 Tutorial 4
 Tutorial 5
 Tutorial 6
 Tutorial 7
 Tutorial 8
 Tutorial 9
 Tutorial 10

Data Files 

Tutorial 2: Developing a Web Site


Creating an Access Key

The most common way to activate a hypertext link is to click it. Some browsers also support access keys, which are keyboard keys assigned to a hypertext link. The syntax for creating an access key is

<a href="url" accesskey="char">content</a>

where char is a single keyboard character. To use an access key, you hold down an accelerator key (usually the Alt key on a PC or the Ctrl key on a Macintosh) and then press the specified access key. For example, if you modify the home.htm link as follows

<a href="home.htm" accesskey="i">Home Page</a>

you can activate this link by pressing Alt+i (on a PC) or Ctrl+i (on a Macintosh). Access keys seem like a good idea, but they've proven to be impractical in most situations. One problem is that most access keys are already reserved by the browser. For example, you can't use the "f" key because the browser uses it to access the File menu. In addition, it is difficult to indicate to the user which access key to press in order to activate a given link. The usual practice is to underline the access key on the Web page; however, by convention, underlining is reserved for indicating links. Browser support for access keys is mixed, so you should not rely on them for your Web site.

Browser Support for Semantic Links

Semantic links have the advantage of making links easily accessible by placing hypertext links outside of the page content and into the browser toolbars or menus where they are always available. Browser support for the link element (other than for external style sheets) is uneven. Some browsers include built-in support; others will support semantic links through add-in programs. The following table lists the support in the major browsers.


Browser Support
Firefox Supports link element through a Firefox extension available at https://addons.mozilla.org/en-US/firefox/addon/2933 and http://cdn.mozdev.org/linkToolbar/
Internet Explorer Supports link elements through an add-in toolbar available at http://www.draig.de/LinkBar/
Opera Supports link elements through a built-in toolbar; the toolbar only shows if there are link elements present in the page
Safari Does not currently support semantic link elements

Check with your browser’s documentation to receive information on the most current level of support.