Note: You’re viewing legacy content!

How to Make an HTML Image Link

Coding in a link is actually really super easy! This tutorial will cover your standard, text links, as well as image links.

Text Links

A text link is just what it sounds like: text that goes to a link. If you click on this link, you’ll be brought to our website’s homepage. Here’s the code:

<a href="">If you click on this link</a>

You’ll see I used our URL for the href value, and I typed in what I wanted the link to say on the outside of the brackets.

Sometimes, you might want your link to open in a new tab or window. It’s easy to do with this code:

<a href="" target="_blank">If you click on this link</a>

Image Links

An image link is just like a text link, except we’re replacing the text with a link. Here is an example, following by the code to generate it:

<a href=""><img src=""/></a>

It is the same code as before, except I’ve added in the HTML image code to tell the image to display. You will need to do the same, replacing the src value with the URL to your uploaded image (usually it will end in .JPG or .PNG).

A lot of times you’ll want to center your image link, too. This can easily be achieved with the following code:

<a href=""><img src=""/></a>