HTML ismap Attribute

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 3 Examples
Images & Maps

Introduction

The ismap attribute is associated with the <img> element when that image sits inside an <a> link. It turns the image into a server-side image map: when the user clicks, the browser sends the x and y pixel coordinates to the server URL, and server-side logic decides which page to load. This is a legacy pattern—most modern sites use client-side <map> and usemap instead.

What You’ll Learn

01

Server-Side Map

Coordinates to server.

02

img in <a>

Required structure.

03

Boolean Attr

Presence = true.

04

ismap vs usemap

Server vs client.

05

isMap JS

Toggle at runtime.

06

Modern alt

map + area tags.

Purpose of ismap

The primary purpose of the ismap attribute is to signal that an image inside a hyperlink should be treated as a server-side image map. Instead of navigating directly to the anchor’s href, a click appends the pointer coordinates (relative to the image) so the server can map that point to a destination—for example, different rooms on a floor plan diagram.

The clickable regions are not defined in HTML when using ismap. The server script (historically a CGI program) interprets coordinates and returns the appropriate response or redirect.

💡
Prefer client-side maps today

For new projects, use usemap with <map> and <area> so regions are defined in HTML and work without custom server code. Learn ismap to understand legacy pages and how server-side maps differ.

📝 Syntax

Place ismap on an <img> that is a descendant of an <a href="..."> element:

ismap.html
<a href="/cgi-bin/map-handler">
  <img src="floorplan.png" alt="Office floor plan" ismap>
</a>

Syntax Rules

  • Valid only on <img> elements that are inside an <a> with an href.
  • Boolean attribute—write ismap or ismap="ismap"; presence enables server-side behavior.
  • The anchor’s href is the server endpoint that receives coordinate data.
  • Always include descriptive alt text on the image for accessibility.
  • Do not confuse with usemap, which references a client-side <map> element.
  • Server must be configured to parse coordinates and respond with the correct link or content.

💎 Values

The ismap attribute is a boolean attribute. It does not take a meaningful string value—its presence alone activates server-side image map mode:

  • ismap — Attribute present: image map enabled (true).
  • Attribute absent — Normal link behavior: click follows href without sending coordinates.
  • ismap="ismap" — XHTML-style boolean syntax; same effect as bare ismap.

In JavaScript, the corresponding property is isMap (camelCase) on the image element:

ismap-js.html
document.querySelector("img").isMap = true;

⚡ Quick Reference

Use CaseMarkupNotes
Enable server-side map<img ismap> inside <a>Sends x,y on click
Boolean trueismap or ismap="ismap"No other values
JavaScriptimg.isMap = trueDOM property
Client-side alternativeusemap="#name" + <map>Modern approach
Required parent<a href="...">ismap img must be in link
Accessibilityalt on imgDescribe the image

Applicable Elements

Element / ContextSupported?Notes
<img> inside <a href>YesCorrect and only valid use
<img> without parent linkNo effectismap is ignored
<area>, <map>NoUse usemap for client-side maps
<input type="image">Similar conceptSubmits x,y with form; different from ismap

ismap vs usemap

Featureismap (server-side)usemap (client-side)
Where regions definedServer script<area> in HTML
On clickSends coordinates to serverBrowser follows area href
Requiresimg inside <a><map name> + usemap="#name"
Modern usageLegacy / rareRecommended

Examples Gallery

Server-side ismap markup, a modern client-side map alternative, and toggling isMap with JavaScript.

👀 Live Preview

Client-side clickable regions (the modern pattern most tutorials should emulate):

Diagram with two clickable regionsLeft regionRight region

This preview uses usemap (client-side), not ismap. Each <area> defines a clickable zone in HTML.

Example — Server-Side Image Map

Let’s look at a simple example of how to use the ismap attribute:

ismap.html
<a href="/map-handler">
  <img src="example.jpg" alt="Example Image" ismap>
</a>
Try It Yourself

How It Works

The ismap attribute on the <img> tells the browser to append click coordinates to the anchor URL instead of navigating to a fixed page. The image must be inside the <a> element.

Example — Modern Client-Side Map (usemap)

For most new projects, define clickable regions in HTML instead of relying on server-side coordinate handling:

usemap.html
<img src="diagram.png" alt="Solar system" usemap="#planet-map">

<map name="planet-map">
  <area shape="rect" coords="0,0,82,126" href="earth.html" alt="Earth">
  <area shape="circle" coords="200,60,40" href="mars.html" alt="Mars">
</map>
Try It Yourself

How It Works

This is not ismap. The usemap attribute links the image to a <map> element. Browsers handle hit-testing locally—a clearer, more maintainable approach for interactive diagrams.

Dynamic Values with JavaScript

Toggle server-side map behavior with the isMap property. Note: useMap is a separate property for client-side maps:

dynamic-ismap.html
<a href="/map-handler">
  <img id="interactiveImage" src="map.png" alt="Map">
</a>

<script>
  document.getElementById("interactiveImage").isMap = true;
</script>
Try It Yourself

How It Works

The DOM property isMap mirrors the ismap content attribute. The old reference sometimes mixed in useMap; that property attaches client-side <map> data and does not send coordinates to the server.

♿ Accessibility

  • Provide meaningful alt text — Describe the image content for users who cannot see it.
  • Use alt on each <area> — For client-side maps, every region needs descriptive alternative text.
  • Server-side maps are hard for keyboard users — Coordinate-based clicks rely on precise pointer input; prefer client-side maps or standard links when possible.
  • Offer non-image navigation — Provide a text list of the same destinations alongside complex image maps.
  • Test with screen readers — Ensure interactive regions are announced clearly when using area elements.

🧠 How ismap Works

1

Author adds ismap on img in link

Boolean attribute inside <a>.

Markup
2

User clicks the image

Browser captures x,y coordinates.

Input
3

Request sent to server

Coordinates appended to anchor URL.

Network
=

Server picks destination

Script maps point to the correct page.

Browser Support

The ismap attribute is supported in all major browsers when used on an <img> inside an anchor. Behavior is legacy but consistent. Client-side usemap maps have broader practical use today.

HTML · Fully supported

Legacy server-side map support

Browsers still send click coordinates for ismap images inside links.

99% Browser support
Google Chrome Fully supported
Full support
Mozilla Firefox Fully supported
Full support
Apple Safari Fully supported
Full support
Microsoft Edge Fully supported
Full support
Internet Explorer Fully supported
Full support
Opera Fully supported
Full support
ismap attribute 99% supported

Bottom line: Supported for legacy server-side maps; use usemap for new interactive images.

💡 Best Practices

✅ Do

  • Wrap ismap images in an <a href> pointing to your map handler
  • Provide descriptive alt text on the image
  • Prefer usemap + <area> for new interactive diagrams
  • Test map behavior across browsers if you maintain legacy ismap pages
  • Offer a text alternative listing the same link destinations

❌ Don’t

  • Use ismap on an <img> outside a link
  • Confuse ismap (server-side) with useMap (client-side)
  • Rely on server maps without accessible fallbacks
  • Assume coordinates work without server-side handling code
  • Skip alt on images or area regions

Conclusion

The ismap attribute is a crucial tool for understanding server-side image maps in HTML. It lets clicks on an linked image send coordinates to the server, which then determines the destination.

For modern interactive images, client-side <map> and <area> with usemap are easier to build and maintain. Know both approaches so you can read legacy code and choose the right pattern for new work.

Key Takeaways

Knowledge Unlocked

Five truths every developer should know about ismap

Bookmark these before building clickable images.

5
Core concepts
🔗 02

img in <a>

Required structure

Syntax
03

Boolean

Presence = true

Values
🗺 04

usemap

Modern alternative

Compare
05

alt text

Always on img/area

A11y

❓ Frequently Asked Questions

It enables a server-side image map on an <img> inside a link. Clicks send x,y coordinates to the server URL so server logic can choose the destination.
No. The ismap attribute only has effect when the <img> is a descendant of an <a> element with an href attribute.
ismap sends click coordinates to the server (server-side map). usemap references a client-side <map> with <area> regions defined in HTML.
Yes. Include ismap on the image to enable it. Omit the attribute for normal link behavior without coordinate sending.
Usually no. Client-side image maps with usemap, <map>, and <area> are simpler and more accessible. Use ismap when maintaining legacy server-driven maps.
Set the isMap property: imageElement.isMap = true. For client-side maps, use imageElement.useMap = "#mapName" instead.

Build interactive image maps the right way

Practice ismap and compare it with modern usemap patterns in the Try It editor.

Try server-side ismap example →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful