In lesson 7a we learned how to write the HTML to place an inline image in our page and in lesson 8e we saw how we could make the entire picture act as a hyperlink to some other related item. Since the early days of the web, there has been a way to have different parts of an inline image be hyperlinked-- known as a "clickable image map".
But until recently, the clickable image maps required that some things be processed from the web server. This is how it works:
Spyglass was the first browser built with the capability to handle the calculations and transmit the proper URL based upon coordinates that were built inside the HTML for a page. This is a client-side process. That entire conversation above now takes place just between the browser and itself! For more information about image maps, see the Imagemap Help Page (IHiP).
The HTML needed for a client-side clickable image map is:
<img src="image.gif" usemap="#map_name">where image.gif is the file name of the image and map_name is an anchor link (see lesson 8d) elsewhere in the same HTML file:
<map name="map_name"> <area shape="rect" coords="x1,y1,x2,y2" HREF=URL1> <area shape="rect" coords="x1,y1,x2,y2" HREF=URL2> : : </map>Each line in the <map>...</map> tag identifies a different "hot" region, specified by the coordinates, coords=. x1,y1 are the horizontal and vertical pixel locations for the upper left corner (relative to the upper left corner of the entire image), while x2,y2 are the horizontal and vertical pixel locations for the lower right corner. URL1, URL2, ... are the URLs (or file names for local files) that the region should correspond to when clicked.
NOTE: To identify the coordinates for the hot region you will have to use some sort of graphics program. Yahoo lists several other utility programs that make this easy to do. For this lesson, we will be providing the exact coordinates for you.
In this lesson we are going to add to our Volcano Terminology page (file term.html) a picture showing different kinds of volcanic eruptions. Each one will be hyperlinked to an external web site. In addition we will create two more links to our own (local) files.
Save this file as volc.jpg and make sure that you store it in your pictures folder/subdirectory.
There are many different types of volcanic eruptions and landforms. They can be classified according to the degree of "explosiveness" and the height of the eruption column: <p> <center> <font size=+2> Investigate each type by clicking on a picture </font><br> <img src="../pictures/volc.jpg" usemap="#volcmap" border=0> <p> </center>
NOTE: We have inserted an inline image that will reference a set of coordinates associated with the name "volcmap". The <center>...</center> tag aligns the image in the middle of the page (see lesson 20). The border=0 attribute inside the <img> tag suppresses the display of a hypertext box around the image.
<map name="volcmap"> <area shape="rect" href="http://volcano.und.nodak.edu/vwdocs/frequent_questions/grp7/europe/question308.html" coords="48,46,204,153"> <area shape="rect" href="explode.html" coords="0,66,26,227"> <area shape="rect" href="height.html" coords="95,283,378,309"> <area shape="rect" href="http://www.geo.mtu.edu/volcanoes/pinatubo/" coords="321,154,468,261"> <area shape="rect" href="http://www.geo.mtu.edu/~boris/STROMBOLI_main.html" coords="172,155,318,274"> <area shape="rect" href="http://www.soest.hawaii.edu/hvo/" coords="36,155,168,276"> <area shape="rect" href="http://www.geo.mtu.edu/volcanoes/santamaria/" coords="90,3,343,123"> </map>
NOTE: You should see that 5 of the 7 defined areas connect to remote internet sites. The two others are local documents that we will create in the next step.
<html> <head> <title>Explosiveness</title> </head> <BODY BGCOLOR=#000000 TEXT=#EEEEBB LINK=#44DDFF VLINK=#00FF88> <H5>Volcano Web / <A HREF="index.html">Index</A> / <A HREF="term.html">Volcano Terminology</A> / </H5> <h1 align=center>Explosiveness</h1> The <b>explosiveness</b> of an observed volcanic eruption is estimated by the calculated force of the eruption. Experiments have shown that when water comes in contact with hot magma, the eruption is much stronger- this is known as <b>hydro-volcanism</b>. <p> For pre-historic eruptions, the explosiveness is estimated by the degree of fragmentation of small volcanic particles. A more explosive eruption will "shatter" volcanic tephra much more then a less explosive eruption. <p> <a href="term.html"> <img src="../pictures/left.gif" alt="** " border=0> Return to <i>Volcano Web</i></a> <HR> <ADDRESS> <B><A HREF="index.html">Volcano Web</A> : <A HREF="term.html">Volcano Terminology</A> : Explosiveness</B> <p> created by Lorrie Lava, <A HREF="mailto:lava@pele.bigu.edu"> lava@pele.bigu.edu</A><br> Volcanic Studies, <A HREF="http://www.bigu.edu/"> Big University</A><p> <TT>last modified: April 1, 1995</TT> </ADDRESS> <p> <tt>URL: http://www.bigu.edu/web/explode.html</tt> <p> </body> </html>Save this document in the same directory as your other HTML files and call it explode.html
<html> <head> <title>Height of Eruption Column</title> </head> <BODY BGCOLOR=#000000 TEXT=#EEEEBB LINK=#44DDFF VLINK=#00FF88> <H5>Volcano Web / <A HREF="index.html">Index</A> / <A HREF="term.html">Volcano Terminology</A> / </H5> <h1 align=center>Height of Eruption Column</h1> The <b>height</b> of a volcanic eruption cloud (in kilometers) is taken from direct observation or from estimates based upon historic accounts. <p> For pre-historic eruptions, this scale is calculated based upon the <b>dispersal</b> of the volcanic products- i.e how far and wide they are scattered. Volcanic eruptions that have very tall columns will spread tephra far and wide. <p> <a href="term.html"> <img src="../pictures/left.gif" alt="** " border=0> Return to <i>Volcano Web</i></a> <HR> <ADDRESS> <B><A HREF="index.html">Volcano Web</A> : <A HREF="term.html">Volcano Terminology</A> : Height of Eruption Column</B> <p> created by Lorrie Lava, <A HREF="mailto:lava@pele.bigu.edu"> lava@pele.bigu.edu</A><br> Volcanic Studies, <A HREF="http://www.bigu.edu/"> Big University</A><p> <TT>last modified: April 1, 1995</TT> </ADDRESS> <p> <tt>URL: http://www.bigu.edu/web/height.html</tt> <p> </body> </html>Save this document in the same directory as your other HTML files and call it height.html
For our case we can set up a special page that has a message for web browsers that do not support client-side image maps:
<html> <head> <title>No Image Map Available</title> </head> <BODY BGCOLOR = #000000 TEXT=#EEEEBB LINK=#44DDFF VLINK=#00FF88> <H5>Volcano Web / <A HREF="index.html">Index</A> / <A HREF="term.html">Volcano Terminology</A> / </H5> <h1 align=center>Sorry!</h1> Apparently your web browser does not support client-side image maps. You can still reach the information by following these links: <ul> <li><A HREF="explode.html">Explosiveness</A> <li><A HREF="height.html">Height of Eruption Column</A> <p> <li><A HREF="http://volcano.und.nodak.edu/vwdocs/frequent_questions/grp7/europe/question308.html">Surtseyan</A> <li><A HREF="http://www.geo.mtu.edu/volcanoes/santamaria/">Phreato-Plinian</A> <li><A HREF="http://www.soest.hawaii.edu/hvo/">Hawaiian</A> <li><A HREF="http://www.geo.mtu.edu/~boris/STROMBOLI_main.html">Strombolian</A> <li><A HREF="http://www.geo.mtu.edu/volcanoes/pinatubo/">Plinian</A> </ul> <p> <a href="term.html"> <img src="../pictures/left.gif" alt="** " border=0> Return to<i>Volcano Web</i></a> <HR> <ADDRESS> <B><A HREF="index.html">Volcano Web</A> : <A HREF="term.html">Volcano Terminology</A> : No Image Map</B> <p> created by Lorrie Lava, <A HREF="mailto:lava@pele.bigu.edu"> lava@pele.bigu.edu</A><br> Volcanic Studies, <A HREF="http://www.bigu.edu/">Big University</A><p> <TT>last modified: April 1, 1995</TT> </ADDRESS> <p> <tt>URL: http://www.bigu.edu/web/nomap.html</tt> <p> </body> </html>Save this file as nomap.html
NOTE: See how we have offered the viewer access to the same information that was available from the clickable image map. A good web page does not restrict someone from content simply because they are using a different web browser.
<img src="../pictures/volc.jpg" usemap="#volcmap" border=0>and replace it with
<a href="nomap.html"> <img src="../pictures/volc.jpg" usemap="#volcmap" border=0> </a>
NOTE: You should be able to dissect this HTML- if the web browser can understand client-side image maps, it does so; otherwise, the whole image is hyperlinked to the nomap.html page.
The Internet Connection at MCLI is
Alan Levine --}
Comments to levine@maricopa.edu
URL: http://www.mcli.dist.maricopa.edu/tut/tut23.html