|
<table>
|
This is the opening tag to say a table starts here. End the table with the closing tag </table>
|
<tr>
|
This tag says here's where a table row starts. End the table row with the closing tag </tr> |
<td>
|
This is the tag to use before typing in information in a table cell. End the table definition segment with the closing </td>
|
cellspacing
cellspacing="5"
|
This attribute for the table tag says lets make the spacing between cells a certain number of pixels. Cellspacing=0 will result in no cellspacing. Default is 2.
|
cellpadding
cellpadding="5"
|
This table tag attribute says lets put this much space between the cell's contents and the wall of the cell. Cellpadding=0 will result in no cellpadding. Default is 1.
|
border
border="5"
|
This table tag attribute says lets make the border a certain number of pixels wide. Border=0 will result in no border displayed.
|
width
width="500"
or
width="100%"
|
By using this table tag attribute you can determine maximum width for the table on the page. This can be expressed in either % or number of pixels. Width=100% means that the table should take up all the horizontal space available. |
height
height="500"
or
width="100%"
|
Yet another attribute. You can determine maximum height for the table on the page. This can be expressed in either % or number of pixels. Height=100% means that the table should take up all the vertical space available. |
valign
valign="top"
or
valign="bottom"
|
This attribute determines how text will be aligned in the table or cell. Default is middle. |
colspan
colspan="3"
|
This attribute allows you to span a cell over more than one column in a table. It is usually used in a <TH> (table head) tag. View the source code at www.familypc.com for an example. |
rowspan
rowspan="3" |
This allows you to span a cell over more than one row in a table. |
|
Here is an example of a table tag using some of the attributes
<Table border="2" cellpadding="3" cellspacing="3" valign="top">
|