HTML and CSS Reference
In-Depth Information
Server-Side Image Maps
The other type of image map you might encounter on the Web is a server-side image
map , in which information about the hotspots is stored on the Web server rather than
entered into the HTML code of a Web page. When you click a hotspot on a server-side
image map, the coordinates of the mouse click are sent to the server, which activates the
corresponding link, sending the linked page to your Web browser.
The server-side image map was the original HTML standard and is still supported
on the Web. However, server-side maps have some limitations compared to client-side
image maps. Because the map is located on the server, you need server access to test
your image map code. Also, server-side image maps might be slower because informa-
tion must be sent to the server with each mouse click. Finally, unlike client-side image
maps, server-side image maps require the use of a mouse to send the information to
the server. This makes them unsuitable for users with disabilities or users running non-
graphical browsers.
To create a server-side image map, you enclose an inline image within a hypertext
link such as
<a href=” map ”>
<img src=”fi fi file ” alt=” text ” ismap=”ismap” />
</a>
where map is the name of a program or file running on the Web server that handles the
image map. The ismap attribute tells the Web browser to treat the inline image as an
image map.
Linking to Resources on the Internet
In the tips.htm fi le, Gerry has listed some of the Web sites he fi nds useful in his study of
photography. He would like to change the entries in this list to hypertext links that his
readers can click to quickly access the sites.
Introducing URLs
To create a link to a resource on the Internet, you need to know its URL. A Uniform
Resource Locator ( URL ) specifi es the location and type of a resource on the Internet.
Examples of URLs include www.whitehouse.gov , th e home page of the President of the
United States, and www.w3.org , th e home page of the World Wide Web consortium. All
URLs share the general structure
scheme : location
where scheme indicates the type of resource referenced by the URL and location is the
location of that resource. For Web pages, the location refers to the location of the HTML
fi le; but for other resources, the location might simply be the name of the resource. For
example, a link to an e-mail account has the recipient's e-mail address as the location.
The name of the scheme is taken from the network protocol used to access the
resource. A protocol is a set of rules defi ning how information is passed between two
devices. Your Web browser communicates with Web servers using the Hypertext Transfer
Protocol ( HTTP ). Therefore, the URLs for all Web pages must start with the http scheme.
Other Internet resources, described in Figure 2-36, use different communication proto-
cols and thus have different scheme names.
Search WWH ::




Custom Search