Geoff,

Here's the stuff I promised over the phone, the goods, as it were. I remembered this morning when I went to pick up my HTML book from my bookshelf, since I noticed it was missing and I don't think someone would break in just to steal that, that I loaned it to one of my professors who still has it. So, I'll have to make this up from memory.


INTRODUCTION TO HTML, OR WHAT THE HELL IS IT??

HTML is a rather simple "language." It is, what they call, a markup language. Whatever that means. It works by means of tags.

TAGS, WHAT THEY ARE, WHAT THEY DO, AND OTHER STUFF.

Tags are statements enclosed in brackets, for example:

                      <tag>insert your text here</tag>

Notice an important, yet easily overlooked detail at this point: the tag on the end must have a front slash (/) in it. This designates it as the end tag. Now, <tag> isn't an actual HTML tag. A list of tags follows, but first things first.


HTML FILE STRUCTURE, OR THE HEAD BONE IS CONNECTED TO THE BODY BONE.

When you surround simple ASCII text with an HTML tag it takes on the new characteristic that the tag defines. For example there is one tag, <html> which must surround your entire document because web browsers don't know that stuff outside the html tags is really supposed to be html stuff. Inside the <html> tag is the entire contents of your HTML file.

There are two primary parts to an HTML file: the head and the body.

PART ONE -- THE HEAD

The head contains very little information that is seen by the user. The most important thing for you to know about the head is that the title is located there. Nested inside the <head> and </head> tags you use the <title> and </title> to define the title of your HTML file. It would look like this:

    <html>
    <head>
    <title>Title of My Super-Duper HTML file</title>
    </head>
    <body>
    <abunchastuffyoudon'tknowyet>crapcrapcrap</abunchastuffyoudon'tknowyet>
    </body>
    </html>

Which would look like this when viewed by a web browser:

Title of My Super-Duper HTML file

crapcrapcrapcrap


And there you have it. There are other things you can put in the head of your file, but these are "cutting edge" things that have to do with organization of all your files on the server. I can go into detail later. The <body> and </body> tags enclose all the neato stuff that you're probably interested in at the moment: text, hypertext links, graphics, and other crap.


PART TWO -- THE BODY (OOH BABY!)


As I said, well typed, earlier, most of the interesting stuff that you're interested in is located inside the <body> and the </body> tags. The promised list follows complete with examples.

<p> -- This is the paragraph tag. You use this to designate the beginning of text. A web browser, upon seeing this will indent all the crap and do carriage returns automatically until it sees a </p> or a new <p> tag. Other tags can be nested inside the <p> and </p> tags. They're coming up.

<br> -- This is the break tag. It creates a blank line, for example if you wanted to stick a space between two paragraphs, this would be the tag to use. It is "kinda funny" in that you don't need an ending </br> tag with this one. You can use it if you want, but it's not necessary. The web browser interprets it like this:

<hr> -- The horizontal rule tag is this. Works exactly the same as the break tag, but it puts a horizontal line instead of just a blank line. It looks like this:


<img src="photo.gif"> -- This is the tag used to stick a picture or some other graphical thing in your file. There's an optional alignment thing you can do with the <img> tag to tell where the graphic will be placed in relation to surrounding text. The HTML would look like this:

<img src="photo.gif" align="top"> and would look like this to a web browser:

[Your Picture Here]Text and stuff


The options for align are "top", "bottom", and "middle". Kind of quarkish, but not really. The alignment of graphic to text is as follows:


             top = text is at the top of the graphic, e. g.

                      -------------  Text goes here
                      |   YOUR    |
                      | PICTURE   |
                      |    HERE   |
                      -------------
             middle = text is in the middle of the graphic, e. g.
                      -------------- 
                      |    YOUR    |
                      |  PICTURE   |  Text goes here
                      |    HERE    |
                      --------------
             bottom = text is on the bottom of the graphic, e. g.
                      -------------- 
                      |   YOUR     |
                      |  PICTURE   |
                      |    HERE    |
                      --------------  Text goes here

<a> -- This is the anchor tag. It is used to create links from one file to another or from one section of a file to another labeled section. To create a link from one file to another type in the following:

<html>
<head><title>A link</title></head>
<body>
<p> Stuff.  <a href="linkedfilename.htm">Text you want highlighted</a></p>
</body>
</html>

And it would look like this when viewed by a web browser:

A Link

Stuff. Text you want highlighted

To jump from one part of a file to another labeled portion of the same file do the following:

<html>
<head>
<title>Example</title></head>
<body>
<p>crapcaracpacrap</p>
<a href="samefile.htm#label">Text you want hightlighted</a></p>
<br>
<p>crapcrapcrap <img src="star.gif" align="top"> crapcrapcrap</p>
<br>
<p><a name="label">This is the point to which the web browser will jump
when the user clicks on the Text you want highlighted.</p>
</body></html>

And it would look like this when viewed by a web browser:

Example

crapcaracpacrap

Text you want highlighted


crapcrapcrap crapcrapcrap


This is the point to which the web browser will jump when the user clicks on the Text you want highlighted.


There are also some word-processor-like features in HTML:

<b> -- This makes enclosed text bold. The HTML looks like this:

<b>This text is bold</b> other text isn't.

A web browser would display this like:

This text is bold other text isn't.

<i> -- Italics. Looks like this to you: <i>This text is italicized</i> this other text isn't.

A web browser would display this like:

This text is italicized this other text isn't.

<strong> -- Same as bold

<blink> -- Makes enclosed text or stuff blink. Now, there's a surprise. The code looks like this:

<blink>This is blinking --- how annoying.</blink>

And it would look this annoying when displayed by your web browser:

This is blinking --- how annoying.

<center> -- Centers enclosed text or graphics. Yet another surprise. The HTML code would look like this:

<center>This text is centered, and thankfully not blinking</center>

And it would look like this when viewed with a web browser:

This text is centered, and thankfully not blinking

To center a picture just enclose the <img> tag in the <center> tags:

<center><img src="photo.gif"></center>

In your web browser:

[Your Picture Here]

FORMATTING STUFF, OR HOW TO MAKE STUFF LOOK NEATO

In HTML you are not limited to just an endless list of paragraphs interspersed with highlighted links and pictures. You can create headings of various sizes, lists of various types, tables, and you can plop preformatted text right into your HTML file without the web browser screwing it up (this is useful when exact spacing is important, since normally spacing is relative according to monitor type, resolution, which web browser is being used, and which operating system one is running, and is done automatically by the web browser).


HEADINGS


<hn> -- This is the tag you use to create headings. N is a variable and can be equal to any integer from 1 to 6, with 1 being the largest and 6 the smallest. This tag will bold and make the font size larger for all the text enclosed in the <hn> and </hn> tags. Example:

<html><head><title>Head Example</title></head><body>
<h1>This would be a very large heading</h1>
<p> Text follows</p>
<h6> This would be a very small heading </h6>
<p> text follows </p>
</body></html>

And a web browser would display this as follows:

Head Example

This would be a very large heading

Text follows

This would be a very small heading

text follows


LISTS

<ol> -- This is used at the beginning of an ordered list, that is, a list where each list item is numbered.

<ul> -- This is used at the beginning of an unordered list, that is, a list where each list is set apart with a bullet.

<li> -- This designates the beginning of a new list item. All <li> tags need to nested within either <ol> and </ol> tags or <ul> and </ul> tags. Outside of these tags, <li> is meaningless. An example follows:

<html>
<head>
<title>Example of some lists</title>
</head>
<body>
<ol><h3>An ordered list</h3>
<li> This is item number one.</li>
<li> This is item number two.</li>
<li><i>Item number three is italicized.</i></li>
</ol>
<ul><h3>An unordered list</h3>
<li> First item of an unordered list</li>
<li> <--- There's a bullet right there.</li>
</ul>
</body>
</html>

Example of some lists

    An ordered list

  1. This is item number one.
  2. This is item number two.
  3. Item number three is italicized.

TABLES

With HTML you can stick your information into a neato table format. The necessary tags are <table>, <caption>, <tr>, and <td>.

<table> -- This tag defines the area where all the table information will be, much like <ul> defines the area where all the list information will be. There is an optional modifier "border cellpadding" that can be put into the table tag, which defines how thick the lines that define the cells of the table will be. In an HTML file this would look like:

<table border cellpadding=5>

<caption> -- you use this tag to define the title of your table. It works in a similar manner to the <title> tag. You can adjust the size of the font with the <hn> tag. In HTML this would look like:

<caption><h3>Title of My Table</h3></caption>

<tr> -- this defines a table row. Inside this tag you will need to define each individual cell, much like with lists. There is an optional modifier with this tag -- "align". This defines the alignment of the text in the cells. The legal values for align are "center", "left", and "right".

<td> -- this defines the items within each individual cell, and works much like <li>. Table cells can include plain text, hypertext links, or even graphics, I think.

The actual code for a table in HTML would look like this:

<table border cellpadding=5>
<caption><h3>My Table</h3></caption>
<tr align=center>
  <TD><a href="geoff.html#head">Visit the Headings again</A></td>
  <TD><A HREF="geoff.html#lists">Visit the Lists again</A></TD>
  </TR>
<TR ALIGN=CENTER>
  <TD>This is just plain text</TD>
  <TD><A HREF="http://www.yahoo.com">Search Yahoo!</A></TD>
  </TR>
</TABLE>

And it would look like this when the web browser displayed it:

My Table

Visit the Headings again Visit the Lists again
This is just plain text Search Yahoo!

PREFORMATTED TEXT

If you want to keep line spacing on a block of text exactly as you type it in, then surround the text with the <pre> tag. This way the web browser will not set the spacing on it's own, but instead will display the text exactly as you entered it. The HTML code would look like this:

<pre>_________________________This is my preformatted text</pre>

And it would look like this when displayed by a web browser:

                            This is my preformatted text

And here's the same text without the <pre> tag:

This is my preformatted text


ADVANCED TECHNIQUES, OR THE GOOD STUFF

Backgrounds

You can change the color and texture of the background by adding one of two statements to your first <body> tag.


Text Colors

Your text colors can be changed as well. All the following statements go into your first <body> tag, as well.

ADDRESSING, OR WHERE THE HELL IS IT??

TRANSFER PROTOCOLS

Most Web browser (like Netscape) can handle lots of different file transfer types. The file type and transfer protocol are defined in the URL (uniform resource locator) of a file. This is a standardized way of writing out addresses of various documents on the Internet. A list of common transfer protocols follows:

RELATIVE VS. ABSOLUTE ADDRESSING

When creating links to other documents or labels within one document, you can use either relative or absolute addressing in specifying the location of the file you want to link to. Absolute addressing is where, for each link, you write out the entire URL. The advantage of this is that there is rarely errors or confusion in finding the desire document, but it can become tedious.

Relative addressing with HTML works similar to the way it works in DOS. For example if you wanted to edit a file in the crap subdirectory of the present working directory eat, you would type the following:

             edit eat\crap\!.txt

Instead of typing out the whole path:

             edit c:\here\you\jerk\eat\crap\!.txt

Relative addressing in HTML works on the same principle. For example, to display a gif located in the pictures subdirectory of the directory containing all your html files you could type either:

             <img src="http://geocities.datacellar.net/pictures/dumb.gif">

Or:

             <img src="pictures/dumb.gif">

To move up directories just use "..," like you would in DOS. For example, if your file is in the eat subdirectory, but you need something from the pictures subdirectory, just type in the following:

           <img src="../pictures/dumb.gif">

JavaScript

JavaScript is a programming language, which is loosely related to Sun MicroSystem's Java. It can be embedded into HTML files. JavaScript is a simple object-oriented language that can be used to create stand alone "applets" which web browsers such as the Netscape Navigator © can automatically run while loading a page.

An excellent JavaScript tutorial using a similar format to this tutorial has been put together by Voodoo.

That's all I can think of at the moment. I'll update this as I think of stuff.

Any Questions? Just e-mail me.

THE END

1