Search the Whole World Here.,.,

Using an Image as a Link


To use an image as a link, simply nest the img tag inside the a tag:

Example

<a href="default.asp">
  <img src="smiley.gif" alt="HTML tutorial" style="width:42px;height:42px;border:0;">
</a>
Try it Yourself »
Note: border:0; is added to prevent IE9 (and earlier) from displaying a border around the image (when the image is a link).


EmoticonEmoticon