Wednesday, January 23, 2013

Linking to an image

  1. Place your image in the HTML document:
    <img src="image.gif" alt="alt text" />
  2. In front of the image tag, add your starting anchor link:
    <a href="URL"><img src="image.gif" alt="alt text" />
  3. Add a style to remove the border from the image:
    <a href="URL"><img src="image.gif" alt="alt text" style="border:none;" />
  4. Then close the anchor tag right after the end of the image tag:
    <a href="URL"><img src="image.gif" alt="alt text" style="border:none;" /></a>
No spaces between the anchor tag and the image tag. 
If you leave off the style, the image will have a border around it in the default link color.

from http://webdesign.about.com/od/htmltags/ht/htlinkimage.htm

Tuesday, October 9, 2012