add multiple hyperlinks to image

Add Multiple Hyperlinks to Images: A Comprehensive Guide

By Nicole Smith
AD

Ever wished to make an image more interactive, leading viewers to multiple resources with just a single click? That's exactly what linking multiple hyperlinks to an image can achieve. But how do you do this?

In this guide, we'll explore how to add multiple hyperlinks to an image, boosting its interactivity and providing a seamless user experience.

Understanding Anchor Images

Before diving in, let's grasp the concept of anchor images. An anchor image, or hotspot, is an area within an image that, when clicked, takes the viewer somewhere else, like a website or another page on the same site.

AD
How to add a hyperlink to a jpeg in photoshop tutorial
How to add a hyperlink to a jpeg in photoshop tutorial
two screens showing different images on the same page, one with flowers in vases
two screens showing different images on the same page, one with flowers in vases
a woman's face is shown in front of an image of a building with many windows
a woman's face is shown in front of an image of a building with many windows

Multiple anchor images, hence, allow you to have different areas within a single image, each linked to its own unique destination.

Preparing your Image

First, ensure your image is ready. It should be clean, relevant, and not too large to hinder page load times.

Alice Keeler (@alicekeeler) on X
Alice Keeler (@alicekeeler) on X
an image of a computer screen with various objects
an image of a computer screen with various objects
Difference Between Hypertext and Hyperlink
Difference Between Hypertext and Hyperlink

Next, think about where you want to link each section of the image. Keep these areas distinct and intuitive for users to understand where they'll be directed.

Creating the HTML Structure

Now, let's dive into the HTML. The key is to use the tag nested within a tag, which defines an image map.

AD

Each tag corresponds to an anchor area. It includes attributes like 'coords' for area dimensions, 'href' for the URL, and 'alt' for a text description.

Chain icon in comic style. Network hyperlink cartoon vector illustration on white isolated background. Attach splash effect business concept.
Chain icon in comic style. Network hyperlink cartoon vector illustration on white isolated background. Attach splash effect business concept.
a woman's profile is shown with the sun setting behind her and trees in the background
a woman's profile is shown with the sun setting behind her and trees in the background
Hypertext vs Hyperlink: Difference and Comparison
Hypertext vs Hyperlink: Difference and Comparison
a man sitting at a table in front of a computer screen with red neon lights on it
a man sitting at a table in front of a computer screen with red neon lights on it
a city street with tall buildings and yellow cabs driving down it's sides
a city street with tall buildings and yellow cabs driving down it's sides
six different pictures of people with hair and makeup on their faces, including one woman's face
six different pictures of people with hair and makeup on their faces, including one woman's face

Implementing Multiple Hyperlinks

Let's see a practical example. Assume we have an image of a city with a map area for the airport, and another for the city center.

The code for this could look like this:

AD
City image with links

Img Map Shapes

The 'shape' attribute can be 'circle', 'rect', 'poly', or 'default'. Coordinates depend on the shape. For 'circle', use x, y, radius.

13 Cool AI Image Extenders to Seamlessly Expand Your Photos
13 Cool AI Image Extenders to Seamlessly Expand Your Photos
an artistic photo with blue and white designs on the face, hands and feet in front of a cross
an artistic photo with blue and white designs on the face, hands and feet in front of a cross
a woman's face in front of a waterfall
a woman's face in front of a waterfall
an image of three different faces in the same color and black and white, with one woman's face partially obscured by another
an image of three different faces in the same color and black and white, with one woman's face partially obscured by another
Dual split image of beautiful #AsianGirl face portrait: First half vertical streaks of colorful paint dripping down across the canvas creating a rain-like effect, second half horizontal geometric lines side across the canvas creating a dissolving effect, transparent circular auras, speed movement, freeze frame, gradient white to black background, warm depth, artistic expression, balanced compositions, harmonious dance, peaceful contemplation, deep connection Flowing Halftone, Divided Face, Half And Half Portrait, Split Portrait, Split Face Picture, Split Face Portrait, Split Face Art, Halftone Gradient Photoshop, Halftone Pattern Affinity Photo
Dual split image of beautiful #AsianGirl face portrait: First half vertical streaks of colorful paint dripping down across the canvas creating a rain-like effect, second half horizontal geometric lines side across the canvas creating a dissolving effect, transparent circular auras, speed movement, freeze frame, gradient white to black background, warm depth, artistic expression, balanced compositions, harmonious dance, peaceful contemplation, deep connection Flowing Halftone, Divided Face, Half And Half Portrait, Split Portrait, Split Face Picture, Split Face Portrait, Split Face Art, Halftone Gradient Photoshop, Halftone Pattern Affinity Photo
Double Exposure Photo Effect in Photoshop
Double Exposure Photo Effect in Photoshop
a double exposure photo of a man's face in the middle of a city street
a double exposure photo of a man's face in the middle of a city street
a woman's face with multicolored background
a woman's face with multicolored background
The Best Way to Upscale an Image Without Losing Quality
The Best Way to Upscale an Image Without Losing Quality
Why Won't My Canva Link Work? Top Reasons & Solutions
Why Won't My Canva Link Work? Top Reasons & Solutions
Царевна
Царевна
two men with different colored hair and beards
two men with different colored hair and beards
Держу в голове
Держу в голове

For 'rect' use x, y, x2, y2. For 'poly', use x1, y1, x2, y2, ..., up to 10 pairs. 'Default' uses x1, y1, x2, y2, x3, y3, ..., up to 10 pairs.

Testing and Validation

Finally, preview your image map to ensure everything works correctly. Validate your HTML to make sure your code adheres to web standards.

AD

Tools like the online W3C Markup Validation Service can help with this.

That's it! Now you can make your images more engaging and informative, leading users exactly where you want them to go with just a single click.

AD