| Using
Tables

Tables
are the building blocks of HTML. Just as
you would use 2X4 wooden studs to build
and support a house you use tables to build
and support your Web page content. Generally
you will not have to build tables manually
in Dreamweaver since your Web pages will
be built from the exported Fireworks document
which automatically creates the tables for
you.
Tables are defined with the <table> tag. A table
is divided into rows (with the <tr> tag), and
each row is divided into data cells (with the <td>
tag). The letters td stands for "table data,"
which is the content of a data cell. A data cell can
contain text, images, lists, paragraphs, forms, horizontal
rules, tables, etc.
Basic Table:
<html>
<body>
<h4>This table has no borders:</h4>
<table>
<tr>
<td>100</td>
<td>200</td>
</tr>
<tr>
<td>500</td>
<td>600</td>
</tr>
</table>
<h4>And this table has borders:</h4>
<table border="1">
<tr>
<td>100</td>
<td>200</td>
</tr>
<tr>
<td>500</td>
<td>600</td>
</tr>
</table>
</body>
</html>
Notice the construction of the table:
<TABLE> <TR> <TD>Your Content</TD></TR></TABLE>
ALL tables follow this format.
Table, table row, table data then the content of the
table cell. Then you add the closing tags for each section
of the table.
- cellspacing is the space between the cells
- cellpadding is the space inside the cells
- bgcolor is background color
- background color can be specified for the whole
table, a single row or individual cells.
If you choose to have a background color for the whole
table (as in the example above), the cellspacing will
appear as the background color in Microsoft Internet
Explorer.
To
Add a Table in Dreamweaver:
- Select INSERT/TABLE from the toolbar.
- In the dialog box that appears enter the number
ROWS you would like.
- Then enter the number COLUMNS.
- Then enter the WIDTH as a percentage
or a fixed width.
- Click OK.
|