How to use an image as a link in HTML?

HTMLWeb DevelopmentFront End Technology

To use image as a link in HTML, use the <img> tag as well as the <a> tag with the href attribute. The <img> tag is for using an image in a web page and the <a> tag is for adding a link. Under the image tag src attribute, add the URL of the image. With that, also add the height and width.


You can try to run the following code to use an image as a link in HTML

Live Demo

<!DOCTYPE html>
      <title>HTML Image as link</title>
      The following image works as a link:<br>
      <a href="">
         <img alt="Qries" src=""
         width=150" height="70">
Published on 01-Feb-2018 10:50:00