Ford & Mason Ltd
HOME
ABOUT
CONTACT
RESOURCES
ADVERTISING



donations support the development of
cronolog.org
and
refcards.com

next up previous contents index
Next: Creating images Up: The IMG element Previous: The IMG element


Simple images

The ALT attribute gives an alternative textual description to be displayed instead of the image by text-mode browsers. This is often just a parenthetical note to indicate that an illustration has been specified, for example:

    <IMG SRC="trees.gif" ALT="[a picture of some trees]">

By default, where images are included on a line with text, the bottom edge of the image is aligned with the baseline of the text. This can be overridden using the ALIGN attribute, which can take the values TOP, MIDDLE or BOTTOM; for example:

    <IMG SRC="trees.gif" ALIGN="TOP"> Hypertext saves trees!

would be displayed as follows:

Hypertext saves trees!

Note that the image element is empty - it does not require an end tag. The end tag </IMG> is illegal and can cause undesirable effects with some browsers.

Future versions of HTML will allow you to specify that text should flow around the image. The Netscape browser from Netscape Communications Corporation already accepts HTML extensions that provide just that. Appendix gif discusses these future directions.


[ITCP]Spinning the Web by Andrew Ford
© 1995 International Thomson Publishing
© 2002 Andrew Ford and Ford & Mason Ltd
Note: this HTML document was generated in December 1994 directly from the LaTeX source files using LaTeX2HTML. It was formatted into our standard page layout using the Template Toolkit. The document is mainly of historical interest as obviously many of the sites mentioned have long since disappeared.

 
Copyright © 1996-2002 Ford & Mason Ltd