How to make an Image a Link in Html

If we want to make the image as a link for linking another Html page then we have to follow the steps which are given below. Using these steps, we can easily make any image as a link:

Step 1: Firstly, we have to type the Html code in any text editor or open the existing Html file in the text editor in which we want to make an image as a link.

Step 2: Now, place the cursor just before the tag in Html document. And, then we have to use the anchor tag which is used for linking another page. So, type the tag at that point.

Step 3: Now, we have to add the attribute of anchor tag whose name is "href". So, type the href attribute within the starting tag. And, then we have to give the path of that html page which we want to link with image. So, type the path in the href attribute as described in the following block or Html code.

Step 4: And, at last we have to save the Html file and then run the file in the browser.

Test it Now

The output of the above Html code is shown in the following screenshot:

How to make an Image a Link in Html




Contact US

Email:[email protected]

How to make an Image a Link in Html
10/30