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/AVvXsEiqEKXrsTWllK-wofjbXQBE04Z0HWfazEKArGmrsIudNbgz5o3BEMrpeX4eHuHuR6ug7OB_FADHZ56G9VeOE3GbvKeyZ6b_eA94_L-iSyyOC-R6tO3JQT83x41E-rtDGEJmxL3V9yi7BYg/s1600/cotton+on.JPG"


 width="300&quot;" height="250" />


      </a>


   </body>


</html>

0 Response to "How to use an image as a link in HTML"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel