Part II - Your first HTML Code

If you have a home page from your Internet Service Provider, Tripod, GeoCities or other similar location, by all means use these for you servers. I like the personal server so that I can test my work, without the world seeing what I am doing.

On with the HTML coding

Finally we come to the coding part. We will start with basic requirements for every page. Keep in mind that any Coding program you use will probably add a lot of this for you, but it is important to know, because even in the best programs, you will have to manually modify lines from time to time.

Let's start by using plain old Notepad from Start/Programs/Accessories (or from your accessories Group in Windows 3.11). Type in the Following lines changing Harry to your name if you like :-).


<title>Harry's Home Page</title>

This is my First HTML Page


You'll notice that I separated some of the sections with spaces. This is for easy reading and not necessary for the HTML coding. The first line begins the document and tells the browser that the content is an HTML document. The second section (<head>) contains various pieces of information about the document and must include the <title> line(s). Title will show in the Title bar of your browser as well as what will be used as the description if you added the document to your favorites (bookmarks). The title is often generated by the HTML coding program (Front Page, etc) and is often thought of as less important by many coders. I don't know your opinion, but I personally am tired of seeing "Welcome to...." In front of many of my favorites. There are several other elements in the <head> section, including the <meta> tags which will be discussed at length in the Marketing portion of this series, but for now we will leave the <head> section having only a title.

Another important item to notice at this point is that each section has a beginning and an end. The end has a slash in front of it, and tells the browser exactly is the end of this section.

Next, in our example, is the body. Here is where the real meat of your page will occur. For now I simply typed This is my First HTML Page. Within the <body> tag you can include certain attributes such as background color, background image, text colors, link colors, and others. Keep in mind that all of those settings can be over-ridden by the user's browser. The whole document ends with the </html> tag to tell the browser that the document is done.

After you type the lines of code in to Notepad, you need to save the document with a name and an html (or htm) extension. My server likes html, so that is what I use. If you are using someone else's server, determine what name to use for the default home page, for the Personal Web Server (PWS) it likes Default.html, but that name can be changed (more on that in another issue). If you are using PWS, make sure you save it to c:\webshare\wwwroot. After you save it, you need to test it. Open your browser and type the URL of your Personal server, mine is http://harry (go figure). Don't know yours? Double click on that little globe with a computer on it down on the Taskbar (assuming you started it, or the system started it). It will bring up your server information. The very first line after the tabs tells you the name of your server. If you still don't have Personal Web Server (what are you waiting for?) just type the full path name of your saved file i.e. C:\my documents\default.html.