Welcome to my
Crash Course for making Tables
Part Deux

Possible attributes for <table> - insert each attribute within the table tag, like this: <table bgcolor=white>

All of these attributes are optional - they are not required to have your table work properly.
These attributes come in really handy for customizing your table:

BACKGROUND=url This will tile a background image into your table, much like a background on your page. However, only the newer versions of browsers can view backgrounds in tables, so it's best not to make the background critical to the overall design of the table.
BGCOLOR=color You can make all the cells in your table any color you like, using the color name or the HEX number. To make each cell a different color, please see the attributes for <td>
BORDER=n This sets the size of the border around the whole table. You can choose to have no border (border=0) or a really thick border (border=15). Experiment with different numbers to see which you prefer.
BORDERCOLOR=color What color would you like the table border to be? You can use the color name or the HEX number.
BORDERCOLORDARK=color To make your border look more 3-dimensional, you can choose a dark color for part of it, and...
BORDERCOLORLIGHT=color A light color to finish off the 3-D effect.
CELLPADDING=n Controls how much space there will be between the edges of the cell and what you have in the cell.
CELLSPACING=n Controls how much space there will be between each cell, and between the cells and the border of the whole table.
COLS=n Tells your browser how many columns are in the table, which sometimes speeds up the loading a bit. This tends to cause the browser to divide the columns equally, though - an effect you may not desire. Experiment with it to see how it works.
WIDTH=n You can decide how wide you want your table to be, using either pixels or a percentage of the page width. If you leave this option out, the table will be as wide as the longest row.

There are a few more attributes, but I am not as familiar with them, so until I've had more practice, I'll leave them out for now.


Possible attributes for <tr> - Insert into tag like this <tr valign=top>

Creates a row in a table.
Some possible attributes include:

ALIGN= Sets the alignment for text in the row. You can choose from center, left, right or justify
BGCOLOR=color Choose your background color for the row, using either the color name or it's HEX number.
VALIGN= Choose the vertical alignment for text in the row, using either middle, top, bottom, or baseline.


Possible attributes for <th> and <td> - to be inserted in the tag like this <th align=center>

Creates a row or column heading in a table. The element is similar to the TD element but emphasizes the text in the cell to distinguish it from text in TD cells. This element is valid only within a row in a table, that is, you must use a TR element before using TH. All attributes are optional.

ALIGN= Aligns the text of your heading in the cell. You can specify center, left, right, or justify.
BACKGROUND=url Adds a background picture just to the heading cell.
BGCOLOR=color Make your header cell any color you like, using either the color name or it's HEX number.
COLSPAN=n Tells the browser how many columns this cell spans
ROWSPAN=n Indicates how many rows this cell spans, so that you can have a heading going down the side of your table.
VALIGN= This is to specify the vertical alignment of text in the heading...You can choose either top, middle, bottom, or baseline.
WIDTH=n This specifies the width of the heading in number of columns.

Again, there are more possible attributes, but I'm not familiar with them yet. I thought it might not be a good idea to put up information I don't know how to use myself :o)


Questions or Comments? - E-mail Me
Or, see how I got my Java Image Carousel working.

SiteInspector Approved