Click to return to home page
Richard Lowe Jr Home

<MAP> and </MAP>

Description Attributes Examples

Description:

Defines an image map. Between the <MAP> and </MAP> you include the definition of the image map areas.

Attributes:

class=class

Indicates that the text is to be formatted using the specified class.

dir=direction

Indicates the direction (right or left) that the text is to be displayed. Useful for languages which display left to right.

event=JavaScript

When event occurs, execute the specified JavaScript.

id = "name"

You can give a text a name, which allows it to be referenced and changed in a script (dynamic HTML).

NAME = "name"

Name of the image map.

lang="lang"

Indicates the language of the text within the text.

style="style"

Defines the style in which the text will be displayed. This overrides any style elements at an "outer" level, such as from the BODY or the Cascading Style Sheet.

title="title"

You can give a text a title if you want. This provides some additional information about the text. I'm not sure why you would want to do this, but you could.

Examples:

<map name="bold">
  <area href="http://www.internet-tips.net" 
      shape="rect" 
      coords="81, 180, 188, 193">
  <area href="http://www.webs-best-awards.com/bold.htm" 
     shape="polygon" 
      coords="113, 50, 112, 72, 116, 78, 120, 102, 101, 101, 101, 129, 
              182, 128, 185, 98, 172, 99, 172, 76, 177, 44">
</map>
<img border="0" src="http://www.webs-best-awards.com/images/sample02.gif" 
      usemap="#bold">

imagemap testThis example shows two image maps. The first map is a rectangle surrounding the URL text on the graphic. This allows someone to click on the URL in the graphic image and go to the site. The second is a complex polygon surrounding the words "Bold Site Award" on the graphic. Clicking here will send someone to the Bold Site Award page in this site.

See also <AREA> and <IMG> for more information.


Unless otherwise noted, all photos and text is Copyright © Richard G Lowe, Jr.