Crus4

logo

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.

<body>
<a href="https://crus4.com">Click Here</a>
</body>

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

<body>
<a href="https://crus4.com"><img src="https://crus4.com/wp-content/uploads/2023/12/image_arrow.jpg" width="300px" height="200px"</a>
</body>

Output

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 *