Welcome to Area52 University/Tables
**Dare To Make A Diffrence**

Lesson Two - Table Control

This lesson will deal with the way to control the basic size of the table and its content. We will working with the table that you began in Lesson One.

The first thing we want to do here is to make sure the table is visible at first. This allows you to be able to more easily see what your table is doing as you build it. The way we do this is by simply adding BORDER=1 to the end part of the TABLE tag like this:

>TABLE BORDER=1<
Setting this to 0 instead of one makes the table invisible.
Now we will make a simple table that is 400 pixels wide.

>TABLE WIDTH=400 BORDER=1<
>TR<
>TD< >/TD<
>/TR<
>/TABLE<




This will create a simple table that is 400 pixels wide,but has no height yet,the height is set by the contents of the table normally,but you can add a HEIGHT=400 to the tags as well,in the same fashion that you add the WIDTH=400 tag above. This will cause the table to have a minimum height.

>TABLE WIDTH=400 HEIGHT=100 BORDER=1<
>TR<
>TD<

YOUR CONTENT HERE
>/TD<
>/TR<
>/TABLE<

YOUR CONTENT HERE

The square you see above is what the table code above it looks like in use. CENTER tags were added *inside* the table,around the text,in order to center such a small sentence inside of the large table in the example above.
Normally though,you would be better off just adjusting the width and height tags of the table itself to a smaller size and then place the CENTER tags on the *outside* of the table. This will give you nicer,more even row of text down the center of the page.

You can change the 400 to any number you want so long as it isn't smaller than the measurements of the tables content.

A few tips to keep in mind before we move on.

1. Tables cannot be made smaller than the largest graphic or block of text inside them.

2. If you want to set the width for a single celled table,place the WIDTH code into the TABLE code and for multi-celled tables,put it into each of the TD tags instead.

3. You may see some web pages where the WIDTH tag is using % percentages instead of pixels,avoid these.What happens is that when the table width is specified using the percentage,it will set the table to the width of the page,in your visitors browser.Which means that if they resize the page even a little bit your table and it's contents will become resized as well and it will no longer look correct.

Your homework for this lesson;
Build a table using this lessons instructions and place your own text or picture inside it on a test page and upload it to your directory. If you have completed this lesson successfully,you can go to lesson three - table color and backgrounds.

Back to the Introduction...

Back to Lesson One...

To the Next Lesson

Hosted by www.Geocities.ws

1