People will ask questions like this: It doesn't seem to simplify the
job, perhaps requiring even more typing? That is true for a 10 line web page but
definitly NOT for a 500 line web page. The benefits are not limited
to this only. Any complex web site uses tables, forms, frames extensively
and most of them are nested in each other. Creating these kinds of
pages is really a challenge if you are not using class.layout.
Enough talking about the design. Let's start with a simple web page.
The function 'newhtml' starts a container with a pair of HTML tags
<HTML> and </HTML>. It is the parent of all other containers thereafter.
function 'wheader' (avoid conflicts with built-in function 'header')
creates a pair of <HEAD>,</HEAD> and contains
'<TITLE>A Test Page</TITLE>'. A table is created and is inserted into
the window container with another 'insert'. Once all the construction
is finished, 'printhtml' prints the results right away.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<TITLE>A Test Page</TITLE>
<TD COLSPAN="2"><FONT>TEST ONLY</FONT></TD>