How to Make a Clickable Link in HTML

If you have an image with you on your website and you want to turn it into a clickable link, it’s probably the easiest thing to do. That being said, we will learn how to make a clickable link in HTML in this chapter.

The way you achieve this is by simply adding an <a> tag to your HTML code.

If you are not sure how to add an image, you can go to back to learning all about the <img> tag and attributes to understand how.

go back meme

Here’s a step by step process to teach you how to make a clickable link in HTML:

How to Make a Clickable Link in HTML

Let’s assume you have an HTML file that’s located on your desktop which carries an image inside.

image site example

Step 1: Navigate to the HTML code.  Mine looks like something like this:

html for image

If you are working on WordPress you will find it by clicking on the Text button next to your Visual button in the editor.

Step 2: Simply wrap the <img> tag inside an <a> tag. We are going to use the ‘href’ attribute of <a> tag to provide the link where the image should navigate to.

image linking html code How to Make a Clickable Link in HTML

NOTE: Don’t forget to close the double inverted commas or your image will go missing.

Step 3: Save it and then open the webpage again. When you do, you will find when you put your mouse cursor over the image a finger symbol meaning a link has been placed on the image.

image linking final result

Step 4: Click on it and it will navigate you to the said location.

How easy was that?

Don’t thank me, thank yourself for your patience! 🙂

Scottshak

Poet. Author. Blogger. Screenwriter. Director. Editor. Software Engineer. Author of "Songs of a Ruin" and proud owner of four websites and two production houses. Also, one of the geekiest Test Automation Engineers based in Ahmedabad.

You may also like...

1 Response

  1. January 12, 2018

    […] I have talked about it a little bit in the HTML section, I would like to take this up here as well since a majority of people are on WordPress these days. […]

Leave a Reply