HyperText Links



Hypertext Links are the highlighted text on Web pages that take you to another Web page when you click on them. You can link to another Webpage on your server or link to a Webpage at another location.

When you link to a Web page on your server, you do not have to specify the complete URL, just the relative location of this file (see text book p.g.77).

When the Webpage is on a different server, you must specify the entire URL. Below are two statements for each case:

Linking to Webpage on your machine

If the Webpage is in the same directory as the webpage linking to it, you use the following statement:
< a href="webpage2.html" > Link to Page 2 < /a >

Try IT



If the Webpage is in the sub-directory called Fun compared to the webpage linking to it, you use the following statement:
< a href="Fun/webpage2.html" > Link to Page 2 < /a >


Linking to Webpage not on your machine

Say you wish to link to IBM's webpage at http://www.ibm.com, you would use the following statement:
< a href="http://www.ibm.com" > Link to IBM < /a >

Try IT




Back