-->

DEVOPSZONES

  • Recent blogs

    How to use an image as a link in HTML

    How to use an image as a link in HTML

    HTML

    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.

    <html>
       <head>
          <title>HTML Image as link</title>
       </head>
       <body>
          The following image works as a link:<br>
          <a href="https://clnk.in/kc21">
             <img alt="COTTON ON" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdeHYIbwy0uhz6phQtApuxjwnAiP7207OpWI1CmoPvn3UIPyuErhyphenhyphenHb45LCNmbtl_B-jn4wd2c_bF-0RUfoh6XVLQpB8NfM-dOx8REmWZYUOoyJJZ9huvXzRQVH2CkQyGHWi8hxK3Bf-E/s1600/cotton+on.JPG"
     width="300&quot;" height="250" />
          </a>
       </body>
    </html>

    No comments