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.
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.
Step 1: Navigate to the HTML code. Mine looks like something like this:
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.
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.
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! 🙂
1 Response
[…] 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. […]