Basic HTML Tutorial

BHP HTML Basics - URL- Web Address

Where is the File?
Before you can add an image to your page or make a hypertext link to another web page, you need to be able to tell the web browser exactly where to find that file or page. There are literally billions of different files available on the Internet and each file has its own unique address or URL (Uniform Resource Locator).
Take this page for example. Its web address or URL is or .html

That long confusing looking string of text starts to make sense when you break it down and look at it bit by bit.

The very first part, http://, says that the file will be accessed using the HyperText Transfer Protocol. This is a standard protocol or set of rules that are used to control the transmission of data. This protocol is a standard method used for transfer of web pages or HyperText documents.

The next section of the URL,, is saying that this file will be found on a web server named "polaris" in a domain named "". This part, if the "Information Superhighway" is an analogy that works for you, is something like a large boulevard. That is , we are in the neighborhood but still need to find the right street and then the right address on that street.

Another way to look at a server is as if it were a big hard drive on the Internet. By using the server name and domain in the URL we have found the right drive, but still need to find which folder or directory contains our file.

The "yourname" is a directory on the server, just like you have different directories on your computer's hard drive. Like the directories on your hard drive, this one can contain both folders and files.

That long, long string, pointing to the exact location of the file through the protocol, server and subdirectories is called the absolute URL.
You'd think there might be an easier way to do it, especially if the file you want is already in the same directory as the HTML file that you are working with. And you'd be absolutely correct. You can use what is called a relative URL, which specifies the file location relative to the HTML file that is referring to it.
For files in the same directory, the relative URL is simply the filename. For a file in a subdirectory, the subdirectory is used along with the file name. For example, if we have a file named "miami.html" in a subdirectory named "cities" and that subdirectory is in the same folder as the HTML file that we want to use "miami.html" in, then the relative URL is "cities/miami.html". This concept will become more clear as we begin to work with adding links and images to our pages in the next sections. It is a very important one to be clear on so we will look at some more examples.
Your student FTP Space or web storage space has a main directory, the one in which you see the folder named README and a folder named private. Your main webpage wil go in this directory and should be named "index.htm" or "index.html". This is a special file name that the web sever will pass on to any request from a web browser that does not specify a file name. So, if someone were to enter your URL or the address of your web page as and did not specify a file name, your main web page would be used as default page.
We have seen that every file on the Internet has its own address. This address is called a Uniform Resource locator or URL for short.
An absolute URL provides the complete protocol, or way to communicate, plus the complete address, including the server name and domain, followed by the path to the file.
We have also seen a "shortcut" method of locating a file in the same directory structure. This method, which includes only the path to the file is called a relative URL.
In the next section, we will look at using a relative URL to add an image to our page.
Back Next
[Back] [Table of Contents] [Next]
Copyright 2000 John H. Bolgiano, Jr. - All rights reserved
Modified with permission for educational use by Roberta Bush