Example Page 8
In this example we are going to add tables to our personal
homepage. Open your welcome page (If you followed the instructions in the examples,
the file name should be index.html). In Example
Page 5 I added an animated image of a flame on top of a torch. In that
exercise I explained that to get the flame to display correctly on the torch you have to
center both the images on the page, since if you didn't, the images do not quite fit over
each other, and that was because the flame image was smaller in width than the torch
image. This meant that it would be impossible to put the image of the burning torch on
both sides of my title. But by adding tables to my page I can now master this. I am going
to add a table with one row and three columns and in the first and third column place the
burning torch, and in the second column place my title image, keeping in mind that I have
to center the burning torch in each column I place it. I have also removed the burning
torch I added in Example Page 5, I just did this because it
looked nicer to me without the torch at the bottom of the page. I also removed my initial
title since my title image now replaces that. Please note that the red and striked out
text (text) is the text I removed form the
original document.
And this is what your code should look like:
- <HTML>
- <HEAD>
- <TITLE>The Green Tentacle
Homepage</TITLE>
- </HEAD>
- <BODY BACKGROUND="bricks.jpg">
<H3 ALIGN="CENTER"><FONT
COLOR="#008000">Welcome to the Green Tentacle Homepage</FONT></H3>
- <TABLE ALIGN="center"
BORDER="0" CELLPADDING="0" CELLSPACING="0"
WIDTH="80%">
- <TR>
- <TD WIDTH="33%" VALIGN="middle"
ALIGN="center">
- <IMG SRC="fire.gif" WIDTH="30"
HEIGHT="52"><br>
- <IMG SRC="torch.gif" WIDTH="50"
HEIGHT="82">
- </TD>
- <TD WIDTH="33%" VALIGN="middle"
ALIGN="center">
<P ALIGN="CENTER"><IMG SRC="title.jpg" WIDTH="250"
HEIGHT="82" ALT="The Tentacle
Homepage"></P>
- </TD>
- <TD WIDTH="34%" VALIGN="middle"
ALIGN="center">
- <IMG SRC="fire.gif" WIDTH="30"
HEIGHT="52"><br>
- <IMG SRC="torch.gif" WIDTH="50"
HEIGHT="82">
- </TD>
- </TR>
- </TABLE>
- <P ALIGN="CENTER">
- <FONT FACE="Times
New Roman">
- <FONT COLOR="#00BF00">A
high sc</FONT><FONT COLOR="#00BE00">hool
student thin</FONT>
- <FONT COLOR="#00BD00">ks,
"When I'm ou</FONT><FONT COLOR="#00BC00">t
of school and d</FONT>
- <FONT COLOR="#00BB00">on't
have to do w</FONT><FONT COLOR="#00BA00">hat
I am told, th</FONT>
- <FONT COLOR="#00B900">en
everything wi</FONT><FONT COLOR="#00B800">ll
be great!" He </FONT>
- <FONT COLOR="#00B700">leaves
school and</FONT><FONT COLOR="#00B600">
suddenly recogn</FONT>
- <FONT COLOR="#00B500">izes
that he won'</FONT><FONT COLOR="#00B400">t
be happy until </FONT>
- <FONT COLOR="#00B300">he
leaves home. H</FONT><FONT COLOR="#00B200">e
leaves home an</FONT>
- <FONT COLOR="#00B100">d
starts universi</FONT><FONT COLOR="#00B000">ty
and soon decid</FONT>
- <FONT COLOR="#00AF00">es,
"When I have </FONT><FONT COLOR="#00AE00">got
my degree, t</FONT>
- <FONT COLOR="#00AD00">hen
I'll be reall</FONT><FONT COLOR="#00AC00">y
happy!" Eventua</FONT>
- <FONT COLOR="#00AB00">lly
he gets his </FONT><FONT COLOR="#00AA00">degree
at which t</FONT>
- <FONT COLOR="#00A900">ime
he realizes t</FONT><FONT COLOR="#00A800">hat
he can't be h</FONT>
- <FONT COLOR="#00A700">appy
until he ha</FONT><FONT COLOR="#00A600">s
a job. He gets </FONT>
- <FONT COLOR="#00A500">his
job and has t</FONT><FONT COLOR="#00A400">o
start at the bo</FONT>
- <FONT COLOR="#00A300">ttom
of the heap</FONT><FONT COLOR="#00A200">.
You guessed it!</FONT>
- <FONT COLOR="#00A100">
He can't be happ</FONT><FONT COLOR="#00A000">y
yet. As the yea</FONT>
- <FONT COLOR="#009F00">rs
roll by, he p</FONT><FONT COLOR="#009E00">ostpones
his happ</FONT>
- <FONT COLOR="#009D00">iness
and peace o</FONT><FONT COLOR="#009C00">f
mind until he </FONT>
- <FONT COLOR="#009B00">gets
engaged, get</FONT><FONT COLOR="#009A00">s
married, starts</FONT>
- <FONT COLOR="#009900">
buying a home, g</FONT><FONT COLOR="#009800">ets
a better job</FONT>
- <FONT COLOR="#009700">,
starts a family</FONT><FONT COLOR="#009600">,
gets the kids i</FONT>
- <FONT COLOR="#009500">n
school, owns hi</FONT><FONT COLOR="#009400">s
home, gets the</FONT>
- <FONT COLOR="#009300">
kids out of scho</FONT><FONT COLOR="#009200">ol,
retires... an</FONT>
- <FONT COLOR="#009100">d
he drops dead </FONT><FONT COLOR="#009000">before
he allows </FONT>
- <FONT COLOR="#008F00">himself
to be bli</FONT><FONT COLOR="#008E00">ssfully
happy. Al</FONT>
- <FONT COLOR="#008D00">l
his present mo</FONT><FONT COLOR="#008C00">ments
were spent </FONT>
- <FONT COLOR="#008B00">planning
for a wo</FONT><FONT COLOR="#008A00">nderful
future wh</FONT>
- <FONT COLOR="#008900">ich
never arrive</FONT><FONT COLOR="#008800">d.
Moral of the s</FONT>
- <FONT COLOR="#008700">tory?
Live each d</FONT><FONT COLOR="#008600">ay
to the fulles</FONT>
- <FONT COLOR="#008500">t.
Don't postpone</FONT><FONT COLOR="#008400">
your happiness t</FONT>
- <FONT COLOR="#008300">o
tomorrow... the</FONT><FONT COLOR="#008200">re
may not be an</FONT>
- <FONT COLOR="#008100">other
tomorrow to</FONT><FONT COLOR="#008000">
enjoy.</FONT>
- </FONT></P>
<P ALIGN="center">
<IMG SRC="fire.gif"
WIDTH="30" HEIGHT="52"><BR>
<IMG SRC="torch.gif"
WIDTH="50" HEIGHT="82"></P>
- <P ALIGN="center">
- <FONT FACE="Times
New Roman" SIZE="4" COLOR="#008000">
- <A HREF="menu.html"><B>ENTER</B></A></FONT</P>
- </BODY>
- </HTML>
 |
Click here to see what the output of the above code would look like. To come
back to this page when you've finished looking at the result, close the new window it
opened in. |
Don't forget to save your file (index.html).
[Return to Tutorial]
-
-
- Copyright � 1999 - 2000 Green Tentacle. All rights reserved. This tutorial is protected by SA and international copyright laws.