|
 Creating links between web pages
Note: Before beginning this tutorial, you should have completed
the previous tutorial Creating a simple web
page.
Add a link on your first page
Open the first.htm file, and add the following lines at the end
of the main body of text (i.e. immediately before the closing </BODY>
tag:
<P>
And you can use text to link. <A HREF="second.htm"> Second
page is here. <A>
Save first.htm again.
Create your second page
Open a new file in Notepad and type in the following:
<HTML> <HEAD> <TITLE>Page
2</TITLE> </HEAD> <BODY TEXT="#000099"
BGCOLOR="#00CC00"> <H1 ALIGN="CENTER">Page 2</H1>
<HR WIDTH="560" ALIGN="CENTER"> <P> <FONT
COLOR="#FF0000"> You can use a different text colour. </FONT>
</P> <P> And pick a background colour.</P>
<P>You can use tables to present images and text:</P>
<TABLE BORDER="0" WIDTH="500"> <TR> <TD
WIDTH="50%" VALIGN="MIDDLE"> <P ALIGN="RIGHT"> A roaring
success!! </TD> <TD WIDTH="50%"
VALIGN="MIDDLE"> <IMG SRC="lion.gif" > </TD>
</TR> </TABLE> <P ALIGN="CENTER">And use
images as links. </P> <P ALIGN="CENTER"> <A
HREF="first.htm"><IMG SRC="goback.gif" BORDER="0" ></A>
</P> </BODY> </HTML>
Save this file as second.htm .
Check your links
Launch your browser and open second.htm .
To see how your page should look, click here. Check the link to the first page by
clicking on the INDEX button. Go back to your second page by clicking on the
"Second page is here" link.
When you are in these pages, you can view the HTML source by selecting
View_Source (Microsoft Explorer) or View_Page Source (Netscape).
|