to actually answer your questions:

> Can you explain what parameters I can change:
>   background color?
>   font styles?
>   font colors?
>   Can I add a graphic with the company logo at the top?
>
>  If I can change stuff, how exactly do I do it?

the script basically prints out a webpage one piece at a time,
so if you want to change the layout, all you have to do is throw
the right tags into the print() statements.   it'll take a
little bit of playing around to get comfortable with it, but you
should be changing the page structure and adding graphics in no
time.



> What does the "\" in <body bgcolor=\"#FFFFFF\"> mean?

this is one of those 'geek insider' things.. officially, a
backslash followed by another character is known as an 'escape
sequence', and tells the computer to do something special with
the printing.

programming languages break everything down into chunks of text
called 'tokens', then examine the tokens to see what the program
is supposed to do.   in broad terms, tokens are grouped into
four classes, calld 'keywords', 'identifiers', 'operators', and
'literals'.

    keywords are the commands which are built into the language,
    like print().

    identifiers are a form of shorthand for storing data.   when you
    say "x = 7", the value seven eventually gets stored somewhere in
    RAM, but you don't need to know exactly how or where.   all you
    need to know is the identifier 'x', and the computer will take
    care of the rest.

    operators are symbols that assign a relationship between two
    other items in the program.   the equal sign in "x = 7" is
    called the 'assignment operator' because it tells the machine to
    store the value 7 using the identifier 'x'.

    literals are pretty much everything else.   the 7 in "x = 7" is
    a literal.


most of the symbolic funkiness normally associated with computer
programming.. putting things in braces and parentheses, dropping
semicolons all over the place, etc.. are ways of giving the laguage
hints to help it identify tokens correctly.


escape sequences exist because the standard rules for defining
literals aren't perfect.

the basic rule of splitting text into tokens is that you break
along the whitespace.   that's great for things like "x = 7",
because each of the three character sequences 'x', '=', and '7'
really are distinct tokens.   but it kinda sucks if you want to
define a literal like:

    <body bgcolor="#FFFFFF">

because that would be parsed as two tokens:  '<body', and
'bgcolor="#FFFFFF">', which isn't what we want at all.

since we obviously need to have whitespace in the stuff we
print, most languages have some sort of 'quoting operator'
(usually the quotation/inch mark) that turns off the
split-along-whitespace rule temporarily.   anything that appears
between quotes gets packed up as a single token, and identified
as a single literal.

unfortunately, that just creates more problems, because now we
can print whitespace, but not the quotation operator itself.
we need a way of shutting off the part that looks for a closing
quote, too.   that's where escape sequences come in.

an escape is a sort of "literal within a literal" that tells the
language to give the next character special treatment.   the
main use is to identify the "no really.. print this one"
version of a quotation mark, but there are other escapes for things
that would be hard to type normally.

without escapes, the string:

    "<body bgcolor="#FFFFFF">"

would get broken into three pieces:  '<body bgcolor=',
'#FFFFFF', and '>', which still isn't what we want.   so by
throwing in the backslashes:

    "<body bgcolor=\"#FFFFFF\">"

we let the language know that it should ignore the set of quotes
in the middle, and end up with a single literal that looks the way
we want.


some other popular escapes are:

    "\a" :  bell (annoy your ISP bigtime)
    "\n" :  newline (roughly equivalent to <br>)
    "\t" :  tab
    "\\" :  single backslash (otherwise we get the same problem
            all over again)



translating over to HTML, the backslash escape is equivalent to
the &whatever; sequence.   if you want to post the markup of a
link on a webpage, you can't use:

    <a href="somewhere.html">example link</a>

because the browser will just turn that into a literal link.
you have to say:

    &lt;a href="somewhere.html"&gt;example link&lt;/a&gt;

which is displayed as the string we want.









mike stone  <[EMAIL PROTECTED]>   'net geek..
been there, done that,  have network, will travel.

Reply via email to