HTML Navigation
As I have mentioned, before you start making a web page or a web site, the first thing you should do is to create a folder. You should put all your files into that folder. Part of the reason for this is how you must write the address of a file on the Internet. When you link to a file, you must tell the browser how to go to that file. You can give a global address or a local address. A global address could be anywhere on the World Wide Web, and always begins with "http://". A local address is for a file in the same web site, and does not begin with "http://". With local addresses, it is easiest to simply use a single folder for all your files. However, this may not work if you have a larger web site and/or a very large number of files. So you will have to put some files (such as images) into a special folder. However, doing so complicated the way you write addresses in HTML. Let's say that you have two files, named index.html and file2.html. Both are in the same folder, called "webpage." Therefore, the address between them is simple: just give the file name. That's all. But now let's say the two files are not in the same folder. index.html is still in the same place, but now you create a new folder, called folder1. You put file2.html inside folder1.
So now, to go from the index to file2, you must first go into the folder, then find file2. The address from index to file2 now looks like this:
The slash ( / ) means that the name before the slash is a folder, and the name after the slash is inside that folder. This is not too difficult. However, the address going from file2 to file1--that is, from inside a folder, up to a higher folder--that's more difficult. Each time you go up, you must use the characters ../ to show you are going up one folder level. So the address from page2 to page1 is:
From there it gets more difficult. Let's say that you have two folders, called folder1 and folder2. The page1 file is in folder1, and the page2 file is in folder2. To go from one to the other, you must first go up out of the first folder, then down back into the second folder. From page1 to page2, the address would be:
If you can understand this system, then maybe you can use folders inside you main web page folder. But if this is at all confusing to you, then you should just make the one folder and put everything inside of it. It is much easier then. |