πŸš€ LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Expert Masterclasses.
πŸŽ“ COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.
REFERENCEhtml

html Documentation

LOADING ENGINE...

HTML Area Tag

Master the <area> tag. Learn how to create image maps with clickable regions for interactive images.

map.html
<!-- Image Map -->
<img src="map.jpg"
usemap="#worldmap" />
<map name="worldmap">
<area
shape="rect"
coords="0,0,100,100"
href="/link" />
</map>
πŸ—ΊοΈ
image-map.html
1 / 8
πŸ—ΊοΈ

Tutor:Image maps let you create clickable regions within an image. We start with the <map> tag, which defines the map container. Then we use <area> tags inside to define each clickable region.


Skill Matrix

UNLOCK NODES BY LEARNING IMAGE MAPS.

Concept 1: Image Maps

Image maps allow you to create multiple clickable regions on a single image. The <area> tag defines each clickable region, and it must be inside a <map> element.

System Check

Where must the <area> tag be placed?


Community Holo-Net

Share Your Maps

Created an interactive image map? Share your code and coordinate calculations.

Enjoying this guide?

Codesyllabus is 100% free and open-source. Support our mission, pay for server infrastructure, and fuel new tutorials by buying us a coffee!

HTML Area Tag & Image Maps

Author

Pascual Vila

Frontend Instructor // Code Syllabus

The <area> tag is used to define clickable regions within an image map. Image maps allow you to create multiple clickable areas on a single image, each linking to different URLs or performing different actions.

How Image Maps Work

Image maps consist of three main parts: the <img> element (the image), the <map> element (the map container), and one or more <area> elements (the clickable regions). The image references the map using the usemap attribute.

Shape Types

The shape attribute defines the type of clickable region:

  • rect: Rectangle defined by x1,y1,x2,y2 (top-left and bottom-right corners)
  • circle: Circle defined by x,y,r (center coordinates and radius)
  • poly: Polygon defined by a series of x,y coordinate pairs
  • default: The entire image area

Accessibility

Always include the alt attribute on each <area> tag. This provides alternative text for screen readers and helps users understand what each clickable region does. Without proper alt text, image maps can be inaccessible to users with disabilities.

Modern Considerations

While image maps are still valid HTML, they can be challenging to make responsive. For modern, flexible designs, consider using SVG with clickable paths, or layering transparent <a> elements over images with CSS positioning.

Glossary

<area>
Defines a clickable region within an image map. Must be inside a <map> element.
<map>
Container element that holds one or more <area> elements. Requires a name attribute.
usemap attribute
Used on <img> to reference a map. Value must start with # followed by the map name.
shape attribute
Defines the shape of the clickable area: rect, circle, poly, or default.
coords attribute
Defines the coordinates of the clickable region. Format depends on the shape value.
Image Map
A technique for creating multiple clickable regions on a single image using HTML map and area elements.