Here are some BASIC CONCEPTS that you will need to understand
in order to build your webpages, and mount them on the web:

Organization - Keep your files organized on your own computer. Place your webpages, images and scripts into a special directory, and keep it in the same place on your machine. The reasons for this will become obvious as we proceed.

Backup - You might consider 'backing up' your site, once it's created, on an external disk of some kind (a large capacity floppy disk, or if you have a cd writer - you can put it on a cdrom (editable would be nice), or a zip disk/drive is ideal).

Some of the reasons you want to backup are:

  • VIRUS infection,
  • Harddrive Crashes
  • Power Surges,
  • Accidental Erasures...Anything can happen, and often DOES!!

Word to the Wise...Having a back up copy of a website I have been working on has 'saved my bacon' more times than I can count!!

File Naming - There are some 'conventions' that you SHOULD use when naming files for your website. These are:

  • NO SPACES within the file name - On UNIX/LINUX/NT servers, if you leave a space in your file name (such as: my homepage.html) Unix will attempt to insert something to fill the 'space' between 'my' and 'homepage' - usually with a code like '%20' - so that the server will read the file as, 'my%20homepage.html' - now if all the links to reach your homepage say ' homepage.html', your homepage will NEVER be found (the browser will be looking for ''). You would have to address it as: '' in order for your web browser to find it. If you MUST have spaces between the words in the names of your files, use either a 'dash' ('-') or an 'underscore' ('_') or even a 'dot' ('.') to bridge the space, as in: My_homepage.html, 'my-homepage.html', 'my.homepage.html'. That way you will always be able to have your files found correctly.
    NOTE: This is a particular problem for people who use MACS - I see it all the time. MacOS WILL allow spaces in the names of files, whereas Windows platform will NOT. If you use a MAC and have gotten into the 'habit' of putting spaces in your names, lose the habit...It will cause you no end of problems in setting up your site.

  • CAPS vs. LOWER CASE - This is actually a matter of preference, but it's important that you try to be consistent in your naming conventions, if for no other reason than to save your own time and effort. On UNIX/LINUX/NT servers, the system has a built-in 'case sensitivity'. If you place a link to a file that you named 'Myhomepage.html' but you type the link in as 'myhomepage.html' the server will not find that page. By the same token, a page named 'myhomepage.html' cannot be accessed by a link that calls 'Myhomepage.html'. Some administrators' settings even 'force' lowercase in files that you upload, and in almost all cases, all server files are named in lowercase. I would suggest that you use lowercase as a standard method of file naming, but even if you decide you want to capitalize the first letter of all your files, or the first letter of each word in the name of all your files, BE CONSISTENT. Do it the same way every time. This way, you will have no problems with linking to your files, internally or externally, because you will KNOW how you did it without having to go search out the file and check to be sure.
    NOTE: When addressing your webpage in your browser address bar, it doesn't make any difference whether you type the URL in ALL CAPS, all lower case or any combination of the two...because the "default" setting for URLs is lower case, and the browser will convert the address to all lower case automatically.
    (Email addresses use the same defaults, too.)

  • DUPLICATE FILES - Obviously, two files cannot have the same, exact name; your computer will not allow this, nor will the server, so...if you need to keep a 'version' of a file as a backup...try renaming the file with a different file extension (a common one for a backup copy is '.bak') can always append a 'number' to the file name, that let's you know it is the first, second or third 'version' of this file and so on.
    Example: 'index.html' = 'index2.html' - OR - 'index.html' = 'index.html.bak'
Mirroring - What you want to do on your machine is to "MIRROR" the arrangement of your files on your server. This way, you can make your changes to the documents on your own machine, and UPLOAD them (by FTP) to the server, overwriting the original files. Being organized in this way helps to prevent silly mistakes, such as overwriting the wrong index page ... and having to recreate it from scratch... :((

Another 'bonus' of MIRRORING is that the same RELATIVE LINKS that work on your own computer will work on the SERVER without any changes.

Directory Levels - Pay attention to the different DIRECTORY LEVELS on both your own machine and your server. This will be very important in understanding how to apply your internal links between html documents.

Level 1 on your server would be the public directory where your webpages can be viewed by everyone who accesses your URL.

Level 2 would be the directories WITHIN the Level 1 directory. These directories might contain more html pages, or images, or other directories even. If your Level 2 directories contain directories, then those would be Level 3 directories...and so forth. (Directories within directories within you begin to see why organization is important?)

Linking and Addressing - need to tell the browser where to find the images that go on your webpage, by drawing a 'roadmap' for it.
There are two methods you can use:
Simply put, this is creating your link so that the entire URL is completely spelled-out in each link. An example of Absolute Addressing is:

This type of addressing is based on the location within the directory structure of the page from which the call is made. An example of relative addressing would be:

<"../../images/some.jpg"> The page calling the image from the image directory is TWO levels DOWN from the image directory where the file is located.
If the call is originating from the same level as the images directory, then the call would look like this:

The principal advantage to Relative Addressing, is that you could move your files to any server in any domain and the links within the files would still work. With Absolute Addressing you would need to go in and change all the links to reflect the new directory structure. You will find, though, that there are times when for one reason or another, you MUST use Absolute Addressing; no worries...either one is perfectly acceptable.

!!One thing I WOULD recommend regarding link addressing is that you
If you are going to use Absolute Addressing, use it everywhere, and the same goes for Relative Addressing.

Previous      Next