InMotion Hosting Support Center
This is archived and no longer maintained. Any information contained in this article may be out of date.

Any image can be a hyperlink to another webpage or another website alltogether. This will allow your website's visitors to click on an image and go to a different webpage automatically. We will start using the same code as we did in the previous tutorial and build on it in this example:

<img src="/support/Images/image.jpg" align="middle" width="250" height="320" />

Now we will make it a link.  The basic tag to make something an active hyperlink is <a href="/support/___">object/text to be linked</a>.  This looks very foreign to new website designers, since href is not a "word" that most people have seen before, but it is used whenever you want to create a link on your website.  As with other tags, make sure that you close the <a href> tag with the </a> at the end or the hyperlink will never end.  For images, you will simply put the hyperlink tag before and after your image code:

<a href="/support/morepictures.html"><img src="/support/Images/image.jpg" align="middle" width="250" height="320" /></a>

The link above will make the image (image.jpg) a hyperlink to the page morepictures.html on your website.

If you missed our previous article, please see the Changing the Size of an Image tutorial. For more information on this course please visit Inserting Images into a Website

Continued Education in Course 102: Inserting Images into a Website
You are viewing Section 1: How to make an Image a Link
Section 2: How to Align and float images with CSS

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

n/a Points
2017-07-18 4:10 am

This is not great at all. In almost all cases, an <img> element should always have the alt attribute. For image links, the alt attribute should describe where the link will take the user, i.e "alt="Home page". This is to ensure the link will display as text in case if for whatever reason the image doesn't load, and to ensure assistive technologies such as screen readers have a name for the image link.

13,821 Points
2017-07-18 7:50 am
You are correct, it should contain the alt tag for accessibility purposes.
n/a Points
2014-08-12 10:25 am
It wasn't what I thought it was, so I don't know

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

3 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!