Image as a Link in HTML

A Link is used to connect one web page with another. We can use image or any other HTML Element as a link. Although the traditional way is to use text as a link, but today we will learn how to use an image as a link.

In HTML, <a> tag is used to link one page with another. This <a> tag is known as anchor tag. Here is a syntax to link one page with another.

<a href="#url">Click Here</a>

To understand it more clearly let’s write a code in an example below and see how to link pages in text.

<a href="">Click Here</a>

Now to use image as link we have to put an image inside the <a> tag. Here is an example:

<a href=""><img src="" width="300px" height="200px"</a>


image as a link in html
Click on this image

So this is how you can use images as a link in html.

Image as a Link in HTML

Leave a Reply

Your email address will not be published. Required fields are marked *