Creating hyperlinks using images

Creating hyperlinks using images cover image
  1. Home
  2. HTML
  3. Creating hyperlinks using images

Text placed between <A> – </A> tags becomes a hot spot providing a link to another document or to some anchor on the same page.
Images can also be used as hot spots if they are inserted between the anchor tags.

Let’s see how this works:

<A HREF="//www.webdevelopersnotes.com>
<IMG SRC="backtohome.gif" WIDTH="150" HEIGHT="30"
ALT="Takes you back to homepage"></A>

Takes you back to homepage

The anchor tag places a colored border around the image. You can remove this border by specifying “0” as the value of the BORDER attribute in the <IMG> tag.

<A HREF="http://www.webdevelopersnotes.com/">
<IMG SRC="backtohome.gif" WIDTH="150" HEIGHT="30"
ALT="Takes you back to homepage" BORDER="0"></A>

Takes you back to homepage

Any image, whether .gif, .jpg, .png or animated gif can be made into a hot spot using this technique.

HTML