|
Free HTML Table Code Reference
Table Tag
Here is the HTML table help you have been looking for. The
<table></table> tags are an extremely useful item. In
essence, it can make a checker board pattern of many dimensions.
Anything can go in any cell. This is a wonderful tool for page layouts.
|
Syntax
<TABLE width=xxx cellpadding=xx cellspacing=xx border=x
bgcolor="#rrggbb" bordercolor="#rrggbb" align=position
valign=position nowrap>
<tr>
<td>
text-or-graphics
</td>
<tr>
</TABLE>
|
Modifiers
- WIDTH=number
- The width is the width of the table
in either pixels or the percentage of the screen (ie;
80%).
-
- ALIGN=position
- The align modifier controls the
location of an item that is shorter than the screen
width. It can be LEFT, CENTER or
RIGHT.
- VALIGN=position
- The valign modifier controls the
vertical locations for the entire table.
- BGCOLOR="color"
- Defines the background color.
- CELLPADDING=number
- The cellpadding modifier
separates the borders from the text by a number of
pixels.
- CELLSPACING=number
- The cellspacing modifier
separates each cell from another by number of
pixels.
- BORDERCOLOR="color"
- The HTML table border color for the table.
- NOWRAP
- Do not wrap text without the <br> tag.
|
|
TR Table Tag
The <tr></tr> tags control the rows within the table. It
signifies the beginning of the next row.
|
Syntax
<TR bgcolor="#rrggbb" align=position valign=position
rowspan=number>
<td>
text-or-graphics
</td>
</TR>
|
Modifiers
- ALIGN=position
- The align modifier controls the
location of an item that is shorter than the screen
width. It can be LEFT, CENTER or
RIGHT.
- VALIGN=position
- The valign modifier controls the
vertical locations for the current row.
- BGCOLOR="color"
- Defines the background color.
- ROWSPAN=number
- Makes the current cell the height
of number cells. This is a very useful
HTML table trick.
|
|
TH Table Tag
The <th></th> tags define a cell as a table header. It makes
a column but, makes bolder characters and automatically centers
them.
|
Syntax
<TH width=xxx bgcolor="#rrggbb" align=position
valign=position colspan=number>
text-or-graphics
</TH>
|
Modifiers
- WIDTH=number
- The width is the width of the cell in
either pixels or the percentage of the screen (ie;
80%).
-
- ALIGN=position
- The align modifier controls the
location of an item that is shorter than the screen
width. It can be LEFT, CENTER or
RIGHT.
- VALIGN=position
- The valign modifier controls the
vertical locations for the cell.
- BGCOLOR="color"
- Defines the background color.
- COLSPAN=number
- Makes the current cell the width of
number cells. This is a very useful
HTML table trick.
|
|
TD Table Tag
The <td></td> tags are the table data tag. It makes a column
just like the <th></th> tags but, doesn't enhance any of the
attributes.
|
Syntax
<TD width=xxx bgcolor="#rrggbb" align=position
valign=position colspan=number>
text-or-graphics
</TD>
|
Modifiers
- WIDTH=number
- The width is the width of the cell in
either pixels or the percentage of the screen (ie;
80%).
-
- ALIGN=position
- The align modifier controls the
location of an item that is shorter than the screen
width. It can be LEFT, CENTER or
RIGHT.
- VALIGN=position
- The valign modifier controls the
vertical locations for the cell.
- BGCOLOR="color"
- Defines the background color.
- COLSPAN=number
- Makes the current cell the width of
number cells.
|
|
|