Relative versus Absolute Paths for Links

 
An example of a link with an "absolute path":


An example of a link with a "relative path":

An example of an image with an "absolute path":

An example of an image with a "relative path":


You should use "relative path" links to link to files and images  within  your website.    If the server sees a link that looks like this "email.htm" it will automatically look within your website's folder to find that file.  Using relative path links makes it a lot      easier to move your "entire website" to a different web server.

You should continue to use "absolute path" links to link to files and images that are located in other webservers or other folders on a webserver.

Remember, be careful using relative or absolute links.  Always test to see if your links and images  work in your web browser.


         

 



                



Number of Visitors to this site: 
1282



By Chris H. Lewis, Ph.D.


| Home Page  | Assignments  | Web Resources | Site Index  | Top of Page |
 

 

 

   

© 2000 by Chris H.  Lewis, Ph.D.
Sewall Academic Program; University of Colorado at Boulder
Created 1 June 2000:  Last Modified: 4 Feb. 3 2001  E-mail: cclewis@spot.colorado.edu
URL:    http://www.colorado.edu/AmStudies/lewis/Design/relpathshtm