Uniform Resource Locators (continued)

There are two ways of specifying URLs:

Absolute URLs

Absolute URLs provide the entire path to a file, such as:

http://www.grantcom.us/index.html

Absolute URLs are the safest form of URL on the web...because no matter where the HTML file is located, the address is complete...and therefore trackable.

Relative URLs

Relative URLs, on the other hand, assume the context of the current location. So, if you clicked on the link above and loaded the URL: http://www.grantcom.us/index.html into your browser, the context (default, so to speak) would be set to the main directory for http://www.grantcom.us.

Now, if you want to include a hyperlink, or image, or style sheet in the file index.html, you can specify relative URLs that assume the current default. So, a URL reference on that page could simply be:

contact.htm

The browser would assume the current context and complete the URL as:

http://www.grantcom.us/contact.htm

 

 

 

 

 

 

 

 

 

Copyright © 2001 Michael J. Doyle
All Rights Reserved.

Designed & Developed by Mike Doyle
using Macromedia Dreamweaver & CourseBuilder

See Mike's Training Schedule for
HTML, Dreamweaver, & CourseBuilder Courses


Email Mike Doyle