HTP

htp on-line reference : ALTTEXT

Table of Contents
  Introduction
  License
  Tutorial
  Usage
  HTP Tags
  > ALTTEXT
    BLOCK
    BLOCKDEF
    DEF
    FILE
    IF
    INC
    IMG
    IMAGEURL
    OPT
    OUTPUT
    QUOTE
    SET
    UNDEF
    UNSET
    USE, $
    WHILE
    <!---
  History
  Wish list
  Bugs

syntax

<[ref]alttext name="imagename" [ text="imagetext" ]>

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:

  <[ref]alttext name="logo.gif" text="Company logo">

  this line: <[ref]img src="logo.gif">
  becomes this after processing: <[ref]img src="logo.gif" alt="Company logo">

  this line: <[ref]img src="../image/logo.gif">
  will also have an ALT attribute appended to it

  this line: <[ref]img src="logo.gif" alt="Click here for more information!">
  remains unchanged.

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.

  page source
  htp project
  htp homepage
hosted by
SourceForge.net
HTML coding Powered by htp
htp on-line reference / http://htp.sourceforge.net/ref/
Authors: Jim Nelson, Jochen Hoenicke, Michael Möller.
Maintainers: Jochen Hoenicke.

Copyright © 1995-96 Jim Nelson.
Copyright © 2001-2003 Jochen Hoenicke.
Permission to reproduce and distribute this hypertext document granted according to terms described in the License section.

last updated Tue Feb 22, 2011