11/12 Is there a way to write macros or functions in HTML? For
example, assume that I want something like
#define author( person ) Created by <B> person </B>
How would I do that? Thanks.
\_ <!--#include "person.html">
\_ most people would think that you should know something about
the way javascript does it, but there are also a lotta other ways
that are web server / web server extension specific
\_ No. HTML is not a programming language. Your web server
probably has a built in scripting language you can use to generate
HTML (or if, it's apache, a choice of dozens, like PHP & perl),
but HTML itself has none.
\_ or you can write your web page originals in a macro language
(i.e. M4) and then run the macro processor to generate the
HTML. Server side includes as recommended above work but
they do put a significant performance hit on the web server.
\_ which is completely irrelevant for 99% of web servers. -tom |