Advanced HTML Features
Tables, Frames and Forms
(Frames and Forms are not yet ready, check back soon!)

These items are much harder. I recommend holding off on these, until you understand the basic html features first. I am going to start with tables, because that seems to be what folks need to learn fairly quickly, especially when you want to use a border background such as the one I am using here. If you do not use a table for this type of background, you run the risk of having your text overlap the image.

When I create a page, I almost always use a table because it gives more control on where to place things. Here are the basics of a table:

< TABLE >tells the browser to make a table
< TR >starts a new ROW of the table (going down)
< TD >starts a new COLUMN of the table (going across)
< /TD >ends the COLUMN of the table
< /TR >ends the ROW of the table
< /TABLE >tells the browser to end the table
ALWAYS make sure if you use a table, that you have the ending tags on your page, otherwise NOTHING will show up. If you have an error, check that first. You will note with this table, I have 6 rows and two columns. So first I must tell the browser that I want a table, by using < TABLE >, then I say, okay, I want a row, and two columns. Like this:

< TR >(row starts)< TD >(column one starts)< /TD>(column one ends)
< TD >(column two starts< /TD >(column two ends)< /TR >(row ends.)

I have to do that for each of the six rows I want. So the final 6 row, 2 column table code looks like this:

< TABLE >< TR >< TD >info here < /TD >< TD >info here < /TD >< /TR >
< TR >< TD >info here < /TD >< TD >info here < /TD >< /TR >
< TR >< TD >info here < /TD >< TD >info here < /TD >< /TR >
< TR >< TD >info here < /TD >< TD >info here < /TD >< /TR >
< TR >< TD >info here < /TD >< TD >info here < /TD >< /TR >
< TR >< TD >info here < /TD >< TD >info here < /TD >< /TR >< /TABLE >

Okay, beyond the basics, there are some other table attributes that are good to know. It is best to tell the browser how wide your table is, this allows the browser to format your page prior to loading all images and text (this is why it is best to have height and width tags for an image as well.) The table above has a width of 470. Something else you can do is tell the browser if you want a border around your table. You will note the above table has a border attribute of 1, but the table formatting this page has no border. (I build all my page formatting tables with BORDER=1 in the table tag, and then change it to zero after the page is done. By doing this, I can easily see where an error is.) So now, my table tag might look like this:

< TABLE BORDER=1 WIDTH=600 >
I used 600 as a width here, that is approximately how wide a web page is. Athough some folks use a larger size, I make my pages to fit a 400x600 browser window. Now on the column tag (< TD >,) you can add the attribute of alignment. ALIGN=center or right or left, depending on what you want. If you do not specify an alignment, it will default to the left. The finished tag will look something like this:
< TABLE BORDER=1 WIDTH=600 >< TR >< TD ALIGN=center >
You can put a table inside of a table (which is how this page is made.) This allows you to have a background that has a border image such as this one. The html coding for this would look like this:

< !--global table starts-- >
< TABLE BORDER=1 WIDTH=600 >< TR >< TD ALIGN=right >
This is the outer table, everthing within this table will be aligned to the right.
< !--inner table starts-- >
< TABLE BORDER=1 WIDTH=560 >< TR >< TD >
This is the inner table, everthing within this table will by default, be aligned to the left.

The text is here and then you put in your ending tags:

< !--end inner table-- >
< /TD >< /TR >< /TABLE >
< !--end global table-- >
< /TD >< /TR >< /TABLE >

The tags that begin with an exclamation, are only notes to the reader/writer, they do not show up on the document when viewed. The numbers can be altered, as can the alignment, to suit your needs. For a wider border background image, you would use a smaller inner table width. Here is an example:
This table coding looks like this:

< !--global table starts-- >
< TABLE BORDER=1 WIDTH=600 >< TR >< TD ALIGN=right >
< !--inner table starts-- >
< TABLE BORDER=1 WIDTH=480 >< TR >< TD >

The text is here and then you put in your ending tags:

< !--end inner table-- >
< /TD >< /TR >< /TABLE >
< !--end global table-- >
< /TD >< /TR >< /TABLE >

To see an example of a page with a wider border background, you can visit my Garden, an even wider border is in my Front Parlor. My CozySpot has a border on both sides! (Therefore, my global or outer table had to have everthing line up in the center, not the left or right.)

Okay, so those are the basics of a table. But wait, there is much more. Want to put a table around an image to make it look like a frame? Then you need more table help. On to frames, or forms. (These help pages are not yet ready, check back soon!)

 
Return to HTML-help page.

Copyright 6/18/1998
Thanks GeoCities.