Re: aliases in HTML

Paul Ramsey (
Tue, 4 Oct 94 21:16:53 PDT

Date: Tue, 4 Oct 94 21:16:53 PDT
From: (Paul Ramsey)
Message-Id: <>
To: hogg@tapir.Caltech.EDU
Subject: Re: aliases in HTML

>   Is there any way to custom-define a tag in an HTML document, say a
> tag <bug> which will be expanded to <img src="bug.gif"> when the
> document is viewed?  Thanks in advance.

You could use the C proprocessor. It would just require that you build your
HTML pages from source.

---- test.cpp -------
#define bug img src="bug.gif"

<p>This is a paragraph of text

--- Makefile ---
test.html: test.cpp
        /usr/ccs/lib/cpp -P test.cpp > test.html

-------- test.html --------

<img src="bug.gif">
<p>This is a paragraph of text
<img src="bug.gif">

Be careful since some C preprocessors want to do some reformatting of your
data these days but most of the old ones will leave everything but the
macros alone. Also the location and options to your CPP may be different.

paul r.