Relative Paths

You can also use a Relative URL that specifies a directory path but does not include an HTML file specification. This causes the INDEX page located in that directory to be displayed.

For example, to create a link to the Sydney University Welcome Page you only need to include the directory specification in the path. Since the Sydney University Welcome Page resides in the top (master) directory on the server, you can reference it by using the following URL:

<A HREF="/">Sydney University</A>

If you create a subdirectory under your main WWW directory called TEST and you wish to reference the INDEX file in that TEST directory, you can specify:

<A HREF="test/">Test</A>

You can also specify an INDEX file in another directory which is not a subdirectory of the current directory by including the beginning slash (/) character. For example:

<A HREF="/public_html/explore/">Web Exploration</A>

Would create a link to the main INDEX file in the explore directory which is located in the public_html directory.

This concludes this lesson of HTML . Please return to the HTML Index and continue with the next lesson.


go_back.gif (279 bytes)[HTML]go_more.gif (275 bytes)

Revised: Friday, 23 July 1999 by EIE WebMistress