htp on-line reference : Macros
This tutorial should help you with the first steps in htp. This tutorial assumes that you are already somewhat familiar with HTML. You can find good HTML tutorials on the web, e.g. at the W3Schools. If you speak german, spanish, french or japanese, you should take a look at SELFHTML.
On this and the following pages we want to give you an idea of how htp is used. If you read this the first time you should not follow the links to the reference manual.
Writing simple htp files
In their simplest form htp files are just ordinary html files. In that case the htp process just copies the file. However, there are some features of htp makes live easier in many cases. Let's have a look at a simple example:
You can download the file tut1.htp and put it into an empty directory. Then you can invoke htp from the command line (e.g. from the DOS box) like this:
htp tut1.htp tut1.htmlThis creates a file tut1.html, your first html file produced by htp.
In line 1 we use a special tag named
The advantage of using macros is obvious if you consider the email
macro in line 2 and 13. Normally you need to type the email twice,
once in the
As you can see there are two ways to get the value, which is bound
to a macro: One is the
In line 14 you can see another special htp tag, the
In the next section of this tutorial we show you how to use htp in big projects where you have many web pages that should get a similar layout.
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.
last updated Tue Apr 15, 2014