HTML Code Tutorial

Tutor Ebook Download

Anchor Tag - Images as Links

The image tag is actually an anchor. It is used to place a graphic at a desired location. It can also be used as a link to another document or image.
The code:

<img src="image.gif">

This code simply displays the desired image.


Attributes of the image tag:

src
path/filename of image
height and width
For faster loading images specify height and width.
align - left or right
Use the align attribute when placing images within paragraphs. See line break tag.
border
Setting the border property to zero suppresses the blue border that is added to the image when used as a link.
alt
Provide alternate text using the alt attribute. The Alt property can be used to add keywords to your pages for search engine ranking or to improve usability for sight impaired users.

Image as Hyperlink

To use an image as a hyperlink, the code is:

<a href="samesite.htm"><img src="image.gif" border="0"></a>

Thumbnails and Larger Images

To use Thumbnail images to present larger images.

<a href="large_image"><img src="thumbnail_image"></a>

Other Attributes

alt="This is the alternate text" width="350" height="222"

Take a Quiz on the 3 Anchor Tag Lessons





CGI Online
How to Create a Website -Tutorial
Main Website


This Free HTML Tutorial
is provided by Net Success 2000 Plus Inc.
PO Box 1508
Somerset, KY 42502
Last Modified: September 3, 2007

HTML Codes Tutor Ebook