|
|
WIT 2003 |
|||||||||||||||||||||
Files & Folders ModuleWritten for WIT 2003Relative Links? Absolute Links?What are "relative files" and "relative links"?Relatives often live in the same house. Relative files live in the same folder. On a web page, a relative link is a link to a file that is in the same folder. Links are instructions to a browser to go get a file. Browsers are very good at following instructions. Suppose you click on a link, and the link instructions tell the browser to go find a file that is identified by just a file name, like acme.htm. The browser looks in the same folder as the page that contains the clicked link, because this file identified by just a file name is a relative file, and it has to be in the same folder. When we make links for these files, we just use the file name for the link...no drive, no complete url, no path, etc. For a image, like this one, the "relative link" is simply the file name, which is "eiffeltower_waving_md_wht.gif". (That's a long file name, but note that this is just the file name.) This image file is in the same folder as this page file, and the browser expects that both the page file and the image file are in the same folder. What does this mean? Your links to files and images that are part of your project, and are in the same folder as the page on which you are making links, are entered as relative links. All you need to do for these is to type in the file name for the link. You do not type the full address of the file you want to link.
What about files that are in a subfolder located in the same folder as your file? Example: The image above is stored in a subfolder called "images". To create a link to this image, it is necessary to type "images/comp_link_window.jpg". The word "images" is the name of the subfolder, and the "comp_link_window.jpg" is the name of the file. The folder containing the image is in the same folder as the page containing the link to the file.
What are "absolute links"?We use an Absolute Link is when we want to direct the user from our own pages / web site to another web site. An absolute link is a url, such as http://my.yahoo.com/. This is a link to a file on an Internet server. Because this file is not in our own folder/ website, the browser needs the full url to find it. It looks up the address of the Yahoo server, and then goes to that server, looks in the specified folder, and displays the index file for the folder. A common problem with absolute links is typing mistakes. If the url is miss-typed, then the link will not work. The best way to create an absolute link is to:
This page was updated on June 21, 2003 |
||||||||||||||||||||||
|
||||||||||||||||||||||