Tables
Tables are used to create tables similar to spreadsheet and databases.
They are also used to help place pictues and text in a manner which is
suitable to your needs.
If you want to set up charts, spreadsheets, or set up special layouts,
such as columns, then tables are your best bet.
Who uses tables? Many businesses set up price charts with tables. Also,
tables are used to place graphics where people want them to be and are
used for proper alignment. Some even use tables as picture frames by
adding borders.
Where do people put tables? You can use tables anywhere on your page, even
in different frames. Tables can be helpful if you learn to use them
correctly. It takes a lot of time to master the use of tables.
Here's a table for my Swiss account (Just kidding):
| Transaction Date
| Transaction Time
| Transaction Amount
|
| Jan 01, 1998
| 08:00
| 15,000,000
|
| Jan 02, 1998
| 09:00
| 16,000,000
|
| Jan 03, 1998
| 06:00
| 9,000,000
|
| Jan 04, 1998
| 10:00
| -40,000,000
|
|
|
| Total
|
|
|
| 0
|
Source code for that?
<table border>
<tr>
<th>Transaction Date
<th>Transaction Time
<th>Transaction Amount
</tr>
<tr>
<td align="left">Jan 01, 1998
<td align="left">08:00
<td align="left">15,000,000
</tr>
<tr>
<td align="left">Jan 02, 1998
<td align="left">09:00
<td align="left">16,000,000
</tr>
<tr>
<td align="left">Jan 03, 1998
<td align="left">06:00
<td align="left">9,000,000
</tr>
<tr>
<td align="left">Jan 04, 1998
<td align="left">10:00
<td align="left">-40,000,000
</tr>
<tr>
<th>
<th>
<th>Total
</tr>
<tr>
<td>
<td>
<td align="left">0
</tr>
</table>
A little harder:
| Cell 1.1 | Cell 1.2 | Cell 1.3
|
| Cell 2.1 | Cell 2.2 | Cell 2.3
|
| Cell 3.1 | Cell 3.2 | Cell 3.3
|
<table border="3">
<tr> <td colspan="2">Cell 1.1 <td>Cell 1.2 <td>Cell 1.3
<tr> <td>Cell 2.1 <td>Cell 2.2 <td>Cell 2.3
<tr> <td>Cell 3.1 <td>Cell 3.2 <td>Cell 3.3
</table>
Align=right Valign=bottom
| Cell 1 (TR default)
| Cell 2 (align=left)
| Cell 3 (valign=top)
|
Now the source for that:
<table width="100%" border>
<caption>Align=right Valign=bottom</caption>
<tr align="right" valign="bottom">
<td height="50">Cell 1 (TR default)
<td align="left">Cell 2 (align=left)
<td valign="top">Cell 3 (valign=top)
</tr>
</table>
Ok, now I'm gonna go over each tag. A table is contained betwee then
<table> tag and the *</table> tag. You can set width, heigth and
border in the <table> tag. Now you enter the information for the first
row between a <tr> and </tr> When you're done with the first row,
you start another <tr> and </tr> pair. Everytime you want to
enter cell data, you put it after a <td> tag. <th> acts the
same as <td> tag, just bolded. The amount of columns you have
is based on the amount of <td> and <th> tags in each <tr> Just
keep adding <tr> tags for each row, until you're done. Within the
<tr> tag, you can specify how many other cell spaces it will take up,
using the colspan and rowspan attributes. You can also set alignment and
toggle wrapping in the <tr> and <td> tags. If you set one of those
two attributes in the <tr> tag, it will effect all the cells in that
row, unless you specify something different in the <td> tag. The
alignment attributes are align="left|center|right" and
valign="top|middle|bottom" and the toggle is nowrap.
Next lecture