Images

Images can be included with HTML documents using the <IMG> tag. Images can be icons, small images of characters HTML cannot support, or photographs. The linked image must be in one of several graphic formats:
  1. Joint Photographic Experts Group format (JPEG)
  2. Xbitmap (XBM)
  3. Compuserve's Graphics Interchange Format (GIF)
  4. Portable Network Graphics (PNG)
Many tools are available for Macintosh and PC platforms for converting from other graphics formats to those supported by WWW browsers.

IMG has four attributes:

SRC is a required attribute that is assigned the filename or URL of the image to be linked.

<IMG SRC="icon.gif">

ALIGN can be set to top, middle or bottom and indicates how text following a graphic should be aligned with the image.

<IMG SRC="newman.gif" ALIGN="middle">Newman Library

ALT specifies text data to be displayed instead of the graphic if the image cannot be displayed.

<IMG SRC="warning.gif" ALT="Warning!">

ISMAP is used to make an image a graphical navigation tool. More about this soon.


Next Slide