-->
  • Recent Articles

    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://1.bp.blogspot.com/-T9kNXE3BWVw/XhrGjOy51lI/AAAAAAAAKbc/pv0BwFcFPVsFeNRjqGmfpnla8-KXDDT1ACEwYBhgL/s1600/cotton%2Bon.JPG"
     width="300&quot;" height="250" />
          </a>
       </body>
    </html>

    No comments