HTML is HyperText Markup Language, the common format for displaying hypertext documents on the World-Wide Web. The HTML specification is extremely simple but easily extended by embedding different data types, making links to other documents, or through CGI programs.
HTML files are ASCII files and typically carry an .html
extension. (You might find HTML files around the Internet with
an .htm
extension, which is usually an indication that
they were created under DOS or a DOS-derived system.)
HTML files contain text, which is just displayed by the client side's browser, and tags that tell the browser how the text is to be displayed and where to use special features such as hypertext links and embedded images. A few essential tags are:
<HTML>
is the first tag in a document and tells
the browser that it is to interpret everything up to the
</HTML>
tag as HTML.<TITLE>
gives the browser a
title that is usually shown at the top right of the display. It's
paired with </TITLE>
showing the end of the title.<BODY>
indicates the start of the body of
the document. Likewise, the end of the document body is identified
by </BODY>
.<A HREF=linkURL>
tells the browser
that all text up to the following </A>
tag is
to be considered a link to the destination indicated by
linkURL
.CGI is the Common Gateway Interface , a specification for writing programs that are executed by an HTTP server when requested through a WWW browser. CGI provides a simple and well-documented way for developers to write programs that operate on the server side of WWW.
Why is this useful? Many WWW applications need to do "back-end" processing which cannot be done in plain HTML. You might want to do database lookups from a WWW page, or have an action trigger email to yourself, or even create an interactive sequence of pages, where each action affects the look and content of the following page.
Many CGI programs are written in C or Perl, because Unix programmers usually already know C or Perl, and because programs written in those languages offer a lot of the capabilities that are often called for in CGI applications: string manipulation and interfaces to sockets to name a couple.
The advantages of C and Perl are a little less if you are interested in database interfaces, or if you have existing business logic in a Clipper implementation that you want to recycle, or if you just want a higher-level language with all the great FlagShip features that you already know about, such as RDDs and OOP.
Granted, you can do about anything in any language--witness my old FORTRAN compiler implemented as a Lotus macro, which still draws crowds at parties--but still, some languages are better suited than others for a certain application. WebKit was made for people who like Clipper, who want to adapt it for the WWW or corporate "Intranet" servers, and who understand the advantages of running the HTTP server on Unix.
This manual isn't written to educate you on HTML coding or the details of CGI. There are much better HTML references than I could write, already in print or on the net. And if you know how to use WebKit, you may not have to get involved in the details of CGI. So, keep reading (or follow the links) for more.
A great introduction to the underlying logic of the CGI and forms interface is at http://kuhttp.cc.ukans.edu/info/forms/forms-intro.html . It's a particularly useful document if you are using a graphical browser such as Arena, NCSA Mosaic, or Netscape Navigator because the text is explained better by the few accompanying diagrams.
Next Chapter, Previous Chapter
Table of contents of this chapter, General table of contents
Top of the document, Beginning of this Chapter