(Note: If you are new to Internet you should first read the URL Basics section, which discusses URLs in general and come back to this page.)
What are URLs?
The complete URL of this page is
You are not allowed to view links.
Register or
LoginThis refers to file 18.php3 located in html subdirectory inside tutorials directory found at You are not allowed to view links.
Register or
Loginwww.webdevelopersnotes.com
.
Note: The domain name You are not allowed to view links.
Register or
Loginwww.webdevelopersnotes.com
is not case sensitive but the directory and files names are. (This is especially true for Unix based systems).
URLs are often used as values for HREF attribute of the <A> tag. Now, if I want to link to the next section (19.php3) I can use either "You are not allowed to view links.
Register or
Login" or simply "19.php3".
So what is the difference? The former is the complete path of the file while the latter is a relative (relative to this document) path. Since I know that the next page is located in the same directory, I choose to use a relative URL. This helps me in site maintenance and I don't have to type the long address always.
When I want to refer to the homepage of webdevelopersnotes.com from this directory, I use the relative URL "../../index.html" inside HREF. This is a standard Unix notation of referring to URLS. It tells the browser to first come out of the html directory (../) into tutorials directory and from there move, to the next top directory (another ../) which is the root directory of my web-site and then display index.html file.
<A HREF="../../index.html">Homepage<A>
Homepage will take you to the main page of this web-site.