Jack Nilan         HTML Tutorial        EMail : jacknilan@yahoo.com

Using Text Boxes with Image Maps

We can combine our Image Mapping Skills with a new alt feature that will have a text box appear as we mouse over a certain part of a picture.

Showing text on rollover is a simple matter of editing the title and alt attributes in HTML. Showing additional information on rollover is one way to give a user more information about a particular link or image. Alternate text is also a usability function. If the images cannot be seen by the user, the alternate text will appear in its place rather than upon rollover.

  • First we have to have a picture we want to make an ImageMap out of.

  • With this picture instead of clicking on a name and being sent somewhere,
  • we are going to replace the href with the title tag
  • In declaring your image say :

    <img src = "picture.jpg" USEMAP = "#map1">

  • Then declare your map somewhere in the code

    <map name = "map1">
    <area shape="rect" coords="40,13,160,53" title="This is the IBM part of the Map">
    <area shape="rect" coords="187,13,331,53" title="This is the Yahoo part of the picture">
    <area shape="rect" coords="362,13,530,53" title="This is the Google part of the picture">

See a Nice Example of This Here