Tuesday, January 1, 2019

Using an image as a link

Using an image as a link:- 


<html>
<body>

<h2>Image as a Link</h2>
<p>The image is a link. You can click on it.</p>

<a href="default.asp">
  <img src="angel.gif" alt="HTML working" style="width:38px;height:38px;border:0;">
</a>

<p>Add "border:0;" to prevent IE9 (and earlier) from displaying a border around the image.</p>

</body>
</html>

OUTPUT:-


  • To use an image as a link, put the <img> tag inside the <a> tag.

No comments:

Post a Comment

Internal Javascripts

Internal Javascripts :    The script code can be written directly into the HTML document. script code is placed in header of the docume...