Example Page 10
In this example we are going to add sound to our personal
homepage. Open your welcome page (If you followed the instructions in the examples,
the file name should be index.html). Since I want to cater
for both Internet Explorer and Netscape Navigator, I used a plug-in to play my background
sound of a fire crackling and water dripping in the background. We are also going to
change the ENTER link to two separate links, FRAMES and NON-FRAMES.
If the user selects the FRAMES option our page opens the frame version of
our menu (framepge.html) and if the user clicks the NON-FRAMES
option we open our original menu page (menu.html).
And this is what your code should look like:
- <HTML>
- <HEAD>
- <TITLE>The Green Tentacle
Homepage</TITLE>
- </HEAD>
- <BODY BACKGROUND="bricks.jpg">
- <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">
- <IMG SRC="title.jpg"
WIDTH="250" HEIGHT="82" ALT="The
Tentacle Homepage">
- </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">
- <FONT FACE="Times
New Roman" SIZE="4" COLOR="#008000">
- <A HREF="menu.html"><B>
ENTER NON-FRAMES</B></A> / <A HREF="framepge.html"><B>FRAMES</B></A></FONT</P>
- <EMBED SRC="dungeon.wav"
CONTROLLER="false" AUTOPLAY="true" LOOP="true"
WIDTH="1" HEIGHT="1" HIDDEN>
- </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).
And that is your complete interactive web page done. Open your welcome page (index.html)
in a browser and play around with it to see if all the links work and if all the graphics
are in place. If you are satisfied with your page then all you have to do now is upload
all the files to a web server for the whole world to view it.
[Return to Tutorial]
-
-
- Copyright � 1999 - 2000 Green Tentacle. All rights reserved. This tutorial is protected by SA and international copyright laws.