Non-Web Links and Protocols 143
Creating Links
Non-Web Links and Protocols
Web Design in a Nutshell, eMatter Edition
media Fireworks and Adobe ImageReady. There is also a demonstration in
Chapter 10,Tables.
Providing complete alternative text
When a user cannot view images (or has chosen to turn them off), the browser
displays the text specified by thealtattribute within thetag. Unfortu-
nately, for each imagemap graphic you only get one alternative text message. This
means all the links within the imagemap are unavailable to users without graphics.
One common solution to this is to provide a redundant set of links in HTML text
somewhere else on the page so that users who cannot view graphics can still navi-
gate the site.
If the image is divided into pieces, you can provide alternative text for each linked
piece, which alleviates the need to add the extra line of linked text to your HTML
page. The disadvantage, of course, is that this is really only ideal for graphics that
neatly fit into rectangles.
Rollover buttons
Rollover buttons (graphics that change when the user mouses over them) are
popular effects that use the power of JavaScript. Although it is possible to have an
entire imagemap graphic change based on mouse-over cues, it is more efficient to
break the image into pieces and swap out only the small portion that needs to
change with the mouseover. You decrease the download time by only pre-loading
the necessary small graphics. See Chapter 21,Interactivity, for sample JavaScript
code for creating rollover effects.
Non-Web Links and Protocols
Linking to other web pages using the HTTP protocol is by far the most common
type of link; however, there are several other types of transactions that can be
made using other standard Internet protocols.
Mail Link (mailto)
Themailtoprotocol can be used in an anchor tag to automatically send an email
message to the recipient from within the browser. Note that the browser must be
configured to support this tag, so it will not work for all users. Themailto
protocol has the following components:
mailto:username@domain
A typical mail link might look like this:
<A HREF="mailto:[email protected]">Send Jennifer email</A>
You can also experiment with adding information within themailtoURL that
automatically fills in standard email fields such as Subject or cc:. As of this writing,
these additional functions are only supported by Netscape 4.0, so use them with
caution and do lots of testing:
mailto:username@domain?subject=subject
mailto:username@domain?cc=person1