Relative Links

Files and Folders

What are "relative links"?

These are links to files and images in the same folder as the html file you are working with. . When we make links for these files, we just use the file name for the link...no drive, folder, etc. When we want to create a link to a file that is in the same folder as the page file we are working on, we use relative links.

For a image, like this one,

the "relative link" is simply the file name, which is "eiffeltower_waving_md_wht.gif". 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 are "absolute links"?

An absolute link may be a url, such as http://cuip.uchicago.edu/wit/2001. This link is the address of a file on an Internet server. Your browser can find this file because it looks up the address of the cuip.uchicago.edu server, and then it goes to that server, looks in the specified folder, and displays the index file for the folder.

This is also an absolute link: "c:\filemgt\eiffeltower_waving_md_wht.gif". It has a specific address that is not in the same folder as the file it is linked to. A drive:"c", a folder: "filemgt", and file name: "eiffeltower_waving_md_wht.gif" are part of the link address. The additional information tells the browser to go to a specific drive, and folder to find a file to display.

Your browser will show this image on your page as long as you are viewing it on your computer, because you have the file located in the folder c:\filemgt. When you upload the file to a remote server, and then view the file with your browser, you will still see the image, because the browser is told to get the file that is in c:\filemgt, and it does that.

Other viewers of the file, however, probably do not have the file c:\filemgt\eiffeltower_waving_md_wht.gif on their computers.

They will see something like this... The browser cannot find the file because it does not exist.

(Note: the above image is SUPPOSED to be a broken link.)

Image files and relative links in Composer.

Back to Top

 

The contents of the Web Institute Web Site, including the On-Line Curriculum, Web Tank, and Session Notes, are Copyright 1999-2001, Graham School of General Studies, University of Chicago. No one may print, copy, or otherwise reproduce these materials without the express written permission of the Director of the Web Institute for Teachers or the Dean of the Graham School. All rights reserved.