Home | Previous | Next Web Collection Document Design

Images in HTML Documents

Using Images

Must be careful in use of images
Keep image files small
Provide text alternatives to images
Proper choice of image styles and formats

The IMG ELement

Images are included with the IMG element. The basic form is:
  <IMG SRC="file.gif" ALT="alternative text"> ,
where file.gif is the image file and alternative string is a text alternative to the image.

You should always include the ALT attribute to give an alternative to the image. If the image is purely decorative, just put ALT="".

There are several other attributes you should know about -- these control placement of the image on the page, and even the size of the image.


Home | Previous | Next Web Collection Document Design