# htp on-line reference : ALTTEXT

## syntax

`<set time="0">
<block name=a>
a is expanded at time <use time>.
</block>
<block name=b expand>
b is expanded at time <use time>.
</block>
<set time="1">
<use a>
<use b>
contents of a: <use a noexpand>
contents of b: <use b noexpand>
<block name=c expand>
c is expanded at time <use time>; <use a>
</block>
<block name=d expand>
d is expanded at time <use time>; <use a noexpand>
</block>
<block name=e>
e is expanded at time <use time>; <use a noexpand>
</block>
<set time="2">
<block name=a>
a is defined for the 2nd time <use time>.
</block>
<use c>
<use d>
<use e>
`

## synopsis

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:

`<img src="filename" ...>
`

An ALTTEXT tag with a name but no text attribute removes any ALT mapping for this image. Successing 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.

hosted by Sourceforge HTML coding

Copyright © 1995–96 Jim Nelson. Copyright © 2001–2014 Jochen Hoenicke. Permission to reproduce and distribute this hypertext document granted according to terms described in the License section. last updated Sat May 16, 2015