Beginners Guide to HTML


Introduction: This is a beginner's guide to HTML. While you won't learn everything there is to know about creating your own web page, this will definitely get you started in the right direction.

Contents:


What is HTML?

HTML means Hyper Text Markup Language. It's a simple script that is used to create documents that are readable by world wide web browsers. It displays colors, text, images, animation, creates links to other pages, and can be used to download files.

HTML documents are plain-text (also known as ASCII) files that can be created using any text editor. For a Macintosh, you'll use SimpleText; for Windows, you'll use Notepad. These programs are built into your operating system, so not only are they the simplest programs to use, they're free!


Planning Your Web Page

There are several things to consider while creating a web page. The first is reason: why are you putting this page up?

There are a multitude of reasons to build a web page. It can be a personal "brag-rag", used to let people know who you are and what you do. It can be a business page, to advertise your personal business. It can be intended to teach, or it can be used to make people aware of a cause.

The trick to building pages is remembering your audience. If your page is about nuclear physics, there's probably no reason to put cartoons on your page. On the other hand, if your page is for children, large text and pictures may help to hold their attention.

It's also extremely important to remember how people will be viewing your page. In most cases, you'll be building a page for the internet, and people will be connecting to look at your page at rates anywhere between 14,400 baud up to 56k. The slower modems will have a difficult time with graphics-heavy pages, sometimes taking three to five minutes to download a single page. Most people will give up on a page well before it's downloaded, at that rate, so too many graphics may chase away the very audience you're trying to reach.


The Standard Template for a Web Page

Below is a template for a web page. The explanation of what it means follows the template, so if it doesn't make sense quite yet, don't worry.

<HTML>
<head>
<TITLE>
The title of your web page goes here </TITLE>
</head>
<body>

Everything you want in your web page goes here

</body>
</HTML>


Your Header and Body

HTML is what is called a containment language, which means every command in HTML has an opening field and a closing field. The data you want to express on your homepage goes between these tags.

All tags will be surrounded by greater-than (<) and lesser-than (>) signs. Closing tags will always repeat the opening command with a forward-slash in front of it. Look back at the template -- the information in the tags are the commands that make HTML work.

The <HTML> tag announces to a browser that this document is to be read as an HTML document, and that all the data inside that tag should be laid out according to the other tags inside the document.

There are two parts to every HTML document. The first part is the header, and the second the body. On our template, look at the information just below the <HTML> tag.

<HEAD> opens the header. <TITLE> opens a line of information that will appear at the top of your browser window. Usually, you'll put some general information about your page in this. Think of it as the title of the book: it appears on the front cover, but it may not appear in the actual book itself.

</TITLE> closes the title information; </HEAD> closes the header.

The <BODY> tag opens the body of your html document. All the information between the body tags will be viewed in the main window of the browser. Only after you have inserted all the text and graphics that you want in your body will you use the </BODY> and </HTML> tags to close out the body and the html information for the browser.


Tags

All the tags that are discussed next will go into the <BODY> </BODY> of your html document.


Creating a LINK

Links are vitally important to the world wide web: they're what makes it go. Links on your homepage will generally point to areas of your own interest. Creating a link is remarkably simple:

<A HREF="HTTP://www.linktel.net/">LinkTel Networks LLC</A>

You can put any web address in place of the LinkTel Networks web address, and remember to change the name of the link. What you see above will look like this:
LinkTel Networks LLC

The text between the brackets is the highlighted text that you will click on, and so a link should describe what site the person reading your page will be brought to.


Putting Images on Your Page

Linking an image into your page is equally simple. To do this, you must first have uploaded a graphic to your directory, and then code the command in. A simple image command is:

<IMG SRC="car.gif">

This will put the picture you have saved as car.gif on the screen.

Most browsers can read both .GIF and .JPG images. .JPGs are almost always smaller in file size and equal in resolution, and are generally recommended over .GIFs.


Turning an Image Into a Link

To do this we combine what we have learned in making a link and placing an image on the screen. To start this off here is an example:

<A HREF="http://www.linktel.net"><img SRC="http://www.linktel.net/~cathyw/logo.gif" BORDER="0"></a>

As you can see we started with the standard format for making a link. This time, instead of entering text that would be our link, we entered the HTML code for placing an image on the screen that will act as an icon which the user can click on. You'll notice we have two new things happening here. First we had to specify the location of the graphics file you will use as your icon. All you have to do is change the cathyw to your username. Second, we added border information. Borders can range from 0 to 20, and will create a gray border around your image, and can be used to make your image stand out from your background.


Creating an Email Link

If you want someone to be able to send you an email while looking at your page, you can create an email link. Here's an example:

<A HREF="mailto:cathyw@linktel.net">Email Cathy Willis</A>.

This will create a link that looks like this:

Email Cathy Willis.

This tells the user's email application to create a new email, directed to your username. All you have to do is change cathyw to your username.


Naming Your Files

Naming your HTML files is a question of common sense, with one exception. You want to name your main HTML page index.html. Web browsers, by default, assume that the introductory page of any homepage is named index, and search for that. If they do not find it, generally they will list the files they do find in alphabetical order, rather than displaying the crafted index page you've created. Your homepage will be located at:

http://www.yourdomain.com/~username
where username is your username. This address is called your URL (Uniform Resource Location), or your web address.

(For business card purposes, the URL can be shortened to www.yourdomain.com/~username.)

Secondary pages are generally named in a fashion that relates to the topic of the pages; for example, if you have a page on music you like, you'll probably name your page music.html, or a page about cars might be cars.html.


Uploading your web page