htp on-line reference: ALTTEXT


<ALTTEXT NAME="imagename">
<ALTTEXT NAME="imagename" TEXT="imagetext">


ALTTEXT declares an ALT attribute for any IMG tag with a SRC matching the ALTTEXT NAME. Since relative paths can be used to point to the same image, only the filename is considered in all comparisons.

When an IMG tag with a matching source is encountered, htp will add an ALT attribute only if one is not already present. This allows for ALT text to be overridden on specific images and default text on all others.

For example:

    <ALTTEXT NAME="logo.gif" TEXT="Company logo">

    this line: <IMG SRC="logo.gif">
    becomes this after processing: <IMG SRC="logo.gif ALT="Company logo">

    this line: <IMG SRC="../image/logo.gif">
    will also have an ALT attribute appended to it

    this line: <IMG SRC="logo.gif" ALT="Click here for more information!">
    remains unchanged.

If ALTTEXT is specified with a name but no TEXT attribute, it is treated as an undefine, and is removed. IMG tags with a matching SRC name are not changed.

Since this is useful for an image used throughout a set of documents, ALTTEXT is most appropriate in an include file or a default file.

In addition to ALTTEXT, htp can also automatically add WIDTH and HEIGHT attributes to IMG tags.

Table of Contents

htp on-line reference /
Author: Jim Nelson / No email available
Maintainer: Robert King /

Copyright © 1995-96 Jim Nelson.
Permission to reproduce and distribute this hypertext document granted according to terms described in the Introduction

Last updated Fri Oct 27, 2000