Learning HTML
Chapter 4 - HyperText Links

4.3 Uniform Resource Locator (URL)

World Wide Web browsers such as Netscape use a system of Uniform Resource Locators (URL) to identify locations of documents. It is important to understand these when setting up absolute references in your documents. URLs look like this:

http://www.bsimple.org/learnhtml/chap4/2.html

They consist of four parts:

The document type tells your browser what to expect when it contacts the remote computer. The primary types are:

http
Files on a World Wide Web server, using the HyperText Transfer Protocol.
gopher
Files on a gopher server. Gopher is a text-based document distribution system which was once common on the Internet.
ftp
Files on an ftp server using the File Transfer Protocol. This is a system of distributing files to be downloaded to your local computer.
news
Files on a Usenet news group server.
telnet
A telnet connection to a remote computer.
file
A file on your local computer.

The host or server name is the name of the remote computer you will be contacting. This is a standard type of internet address; in the case of World Wide Web servers, the name often (but not always) begins with www. The end of this name tells you something about the type of location:

.edu
Higher education institutions.
.com
Commercial businesses.
.org
Non-commercial organizations.
.net
Networking services companies.
.gov
Federal government agencies.
.mil
Military.

For international locations, this 3-letter type is followed by a 2-letter country code (such as ca for Canada).

The final two parts of the URL are the path name and file name. These identify the specific document you would like to view. In some cases, the file name may be omitted. The browser would then retrieve the default file in that directory. The name of this file can differ depending on the type of WWW server being used. In most cases, default file names for a directory include index.html (or .htm), home.html, or default.html.

Let's practice adding some absolute links to your second sample document. Switch back to Notepad and add the following at the end of the document:

    Here's a link showing a path but no file:<P>
    <A HREF="http://www.bsimple.org/learnhtml/">Learn HTML</A><P>

    Here's a link to a specific file:<P>
    <A HREF="http://www.bsimple.org/about.html">About Us</A><P>

    This links to a search engine:<P>
    <A HREF="http://www.google.com">Search the Web</A><P>

Then save the file and view it in Netscape (remember to use Reload if the changes are not showing). Try selecting some of the links and see how they work.


Learning HTML
www.dickinson.edu/~dempsey
Last updated 6/8/2001
Copyright © 2001 Paul Dempsey