Home   Web Top   Bottom Contents   Prev   Next

Getting Hosted

Topics on This Page

Summary
Editors
Finding a Host for Your Site
Setting Up Your Site


Summary

You've learned quite a lot already. You understand the basic structure of an HTML document. You know several tags that you can use to define the structure of a page and for formatting text within that structure. And you understand what CSS is and how to use it for some very simple formatting.

You're probably anxious to begin creating some web pages of your own, and you now know enough that you can create a very simple web site if you choose to do so at this point.


Editors

You'll need to use an editor to create HTML documents. HTML documents are just text files that you can edit with any simple editor such as Notepad (PC) or BBEdit (Mac). While you're starting out, I suggest that you use a very simple editor. Later, when you understand HTML more fully, you may find that there are editors that can help make the task easier. There are many, many different editors to choose from — many of which are free.

Choose a simple editor to use for now. You can create an HTML document by simply typing the necessary code into the editor. You can begin with the code from any of my textarea boxes by clicking on the select button, hitting Ctrl-C to copy it to the clipboard, switching over to your editor, and hitting Ctrl-V to paste it into the editor. When you save the file, be sure to use an extension of either .html or .htm — it won't work if you use an extension such as .txt.

Once you've saved an HTML file, you can view it in your browser. Choose File|Open in the browser. You'll have an option to browse for the file you want to open. Navigate to where you saved the HTML file.

You'll want to keep the editor and browser open at the same time. You'll switch back and forth between them. When you make changes in the editor, switch back to the browser and click on the reload button to view the changes.


Finding a Host for Your Site

If you're brand new to HTML and building pages for the web, your first big hurdle is establishing your first site somewhere. You'll have to find a someone willing to host your pages on their server. You have several choices.

Here are a few links to help you find a free host (these links open in a new window):

http://www.thefreesite.com/freewebpages.htm
http://freewebguide.hypermart.net/freeweb/webpages.htm
http://www.freewebspace.net/

Setting up your site

Once you select a host for your web site, you'll have to move in.

Directories

First, a little talk about directories. You probably have at least a basic understanding of directories (or "folders") on your own computer. You know that you can put files into a directory, and that you can put other directories into a directory.

On your host computer, you'll be given a directory that's all yours. Just like on your own computer, you can put files into this directory. And you'll probably be able to create subdirectories within this directory (a few free providers may not allow subdirectories or may limit the number of levels of subdirectories you can have).

Your main directory will correspond directly to the URL that the host assigns you. For example, the URL http://wolves.dreamhost.com/ is the URL of my main directory. If I create a subdirectory named subdir, the URL for this subdirectory would be http://wolves.dreamhost.com/subdir/.

HTML files and index.html

Let's say I create an HTML file and name it main.html. If I upload this file into my main directory, you will access it with the URL http://wolves.dreamhost.com/main.html.

You can place a "default" HTML file into any directory.

What if you don't create an index.html file?

Case sensitivity and naming problems

If you're using a PC or Mac, you're used to having file names that are not case-sensitive. If you create a file named main.html, you can refer to it as main.html, MAIN.HTML, or MaIn.HtMl. Your computer doesn't care.

Many hosts use Unix servers. Unix uses case-sensitive file names. If you name your file main.html, you have to refer to it exactly as main.html. If you try to use MAIN.HTML or MaIn.HtMl, you'll get back a file not found error.

If your host uses NT servers, the file names won't be case-sensitive. But you should treat them as if they are, and do your best to match your names to the case. If you ever decide to move your site to a host that uses Unix servers, you'll have a much easier time of it. Believe me. I learned this first-hand when I moved my site from my NT-based GTE site to my Unix-based Dreamhost site.

A naming problem to avoid is the use of spaces in a file name. If you really want to include spaces in a name, you can. But in any URL reference, replace the space with %20 to avoid problems. So if I name a file my file.html, I would use http://wolves.dreamhost.com/my%20file.html to access the file. It's much simpler to just avoid using spaces. (NOTE: IE will access URLs correctly if you code a space rather than %20, but other browsers will not!)

I would suggest avoiding pretty much all special characters when choosing names. If you stick to alphabetic characters and digits (and perhaps underscores) you'll avoid a lot of problems.

There's another reason to avoid using special characters such as spaces, &, % and the like. Many search engines can't handle URLs that contain these types of characters, and you won't be able to list your site with those search engines if you've used these characters.


Home   Web Top   Bottom Contents   Prev   Next