asp.net.ph

Skip Navigation Links

MAP Element | MAP Object

Language References


Contains information about the active areas of a client-side image map.HTML 3.2, 4, 4.01, 5

HTML Syntax

Remarks

An image map is a graphic image with predefined areas that provide links to other documents or content. When a user clicks an area in the image map, the browser loads the URL associated with that area.

There are two different kinds of image maps: server-side and client-side image maps. For server-side image maps, the mapping information is written in a separate file that resides on the web server. For client-side image maps, the mapping information is contained in a MAP element.

To define a client-side image map, the MAP object is referenced with the usemap attribute in an IMG element:

<img src="solarsys.gif" usemap="#SolarMap">

As in the above example, the value of usemap must be a hash ( # ) sign, followed by the name of the MAP element that contains the mapping information, which in this case is "#SolarMap".

The MAP element contains a set of AREA elements, each of which define a region in the image and specifies the URL to which it links.

If the user clicks a point located in multiple overlapping areas, the area that is defined first in the MAP responds to the click.

Members

MAP Members

Example

The following example provides the full code for an image map of the solar system. Clicking on the sun or any planet opens a link to an individual image.

Sample Code


See Also

AREA   IMG



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note