|
In the body, a table begins with <table> and ends with </table>
You can add values to a table tag:
<table align="center" border="0" cellpadding="0" cellspacing="0" >
Adding a border three pixels thick:
<table align="center" border="3">
Tags for a row:
<tr> </tr>
Tags for a column:
<th> </th>
A table with one row and two columns, each column 300 pixels wide vertically aligned at the top:
<table>
<tr>
<th width="300" valign="top"></th>
<th width="300" valign="top"></th>
</tr>
</table>
Tables columns can contain paragraphs, background color, images, you name it. Here are the above two columns each described:
<table>
<tr>
<th width="300" valign="top">column one described as column one</th>
<th width="300" valign="top">column two described as column two</th>
</tr>
</table>
Table rows stretch vertically to accomodate what is put into them. You can make create a column height, 60 pixels in this example:
<th width="300" height="60" valign="top">
Two rows, one with two columns the second with one column. Colspan stands for columns spanned:
<table>
<tr>
<th width="300" valign="top"></th>
<th width="300" valign="top"></th>
</tr>
<tr><th colspan="2"></th>
</tr>
</table>
The properties of whatever is put into all of the columns in a document can be described in CSS. For example:
th {font:14px Arial; color:"000000"}
Copyright © 2008 Frank E. Smitha. All rights reserved.