Home :: Learning HTML :: Images :: Graphic Links
Graphics not only add information to a document, they can also be
linked, like text, to other resources. All you have to do
is make an IMG element the contents of an A element -- in
other words, put the <IMG> tag between the <A>
and </A> tags. Here's an example:
<P>This here <A HREF="http://www.yahoo.com"><IMG SRC="image.gif" ALT="image"
HSPACE="2"></A> is a link to Yahoo... try it out!</P>
Which is rendered as:
This here
is a link to Yahoo... try it out!
If you don't want the border around the graphic (which is the link color, either default or defined in the Document Colors), you can use the BORDER attribute, with a value of 0. This value is in pixels, so you could make the border thicker, as well, with a value higher than 1.
<P>This here <A HREF="http://www.yahoo.com"><IMG SRC="image.gif" ALT="image"
HSPACE="2" BORDER="0"></A> is a link to Yahoo... try it out!</P>
Which is rendered as:
This here
is a link to Yahoo... try it out!
The problem with using BORDER="0" is that readers may not know that an image is also a link, without swiping their mouse (if they use a mouse) over every graphic.
Previous: Aligning Images
Next: Thumbnails
Home:: Learning HTML :: Images :: Graphic Links
Home |
Policies |
HTML |
FAQ
Publishing |
Booklet |
Tools |
Links