Inserting Tables on a Page
the following sections, you find out more about the basics of organizing
your content in tables.
Discovering what you can do with tables
Tables are the perfect way to organize multirow and multicolumn data and
other content within regions of a Web page, particularly because anything
that can go on a page can be placed inside a table cell. Furthermore, in a
table, you can control the alignment, width, and height of the table cells, as
well as style the contents of those table cells with CSS, providing you with a
whole new level of control over the contents of the table.
Tables can have any number of rows and columns, be any width and height,
have any colored border, and have any background color or tiling back-
ground image. What’s more, the cells of the tables can also have unique
widths, heights, and background colors and/or background images that sit
on top of whatever styling attributes happen to be applied to the table.
One of the only real drawbacks to working with tables is that they require a
lot of code to do the job they do, which can increase the overall size of the
HTML file. For example, the table in Figure 2-1 looks fairly straightforward,
but on the code level, it looks like this:
Figure 2-1: Tables require a lot of HTML coding to display content in an orderly manner.
<td class=”toprow”>Winter 2009 Schedule</td>
<td class=”cellstyle”>First Class</td>
15_417966-bk03ch02.qxp 3/25/09 10:35 PM Page 250