Open In App
Related Articles

How to turn an Image into a Link in HTML ?

Improve Article
Save Article
Like Article

In this article, we will see how to turn an HTML image into a webpage link in HTML. The HTML <a> type attribute is used to create a hyperlink to web pages, files, locations on the same page. We can make elements like images into links by nesting them within an <a> element. It defines a hyperlink that is used to link from one page to another. If the <a> tag has no href attribute, then it will be only a placeholder for a hyperlink.


<a href=""></a>

Note: The href attribute is used to specify the destination address of the link.

Example: This example describes adding the link to the image to redirect to a specific page.


<!DOCTYPE html>
<body style="text-align: center;">
        Click on GeeksforGeeks logo to
        Redirect into
    <a href="">
        <img src=
             alt="Click to visit">


Making the image as a link in HTML

Last Updated : 16 Dec, 2021
Like Article
Save Article
Similar Reads
Related Tutorials