Tell a Friend About Our Cool Software

At its most basic, a table is a grid of one or more rows and columns. At
the intersection of each row and column is a cell; table cells can hold
HTML content such as text, hyperlinks, and images. While tables were
designed to display tabular information like pricelists and charts, they are
probably the main layout technique behind many of the Web pages you
may have been admiring. Look, for example, at the cnn.com Web page in
Figure 4-1. Note how the various page elements--text, images, links, and so
on--are arranged in a visually attractive manner that lets the visitor find
what he or she is looking for quickly. There's no way you could create a
Web page like this one with the HTML tags you learned about in Chapters
1 and 2--tables are the key.
Figure 4-1. The www.cnn.com Web page makes extensive use of tables
to achieve an attractive and efficient layout.
Some HTML tables are used in what might be called the traditional manner, for the presentation of rows and columns of data. That's fine, but it just scratches the possibilities of tables. What makes tables so special is that you can change the relationships between rows and columns. One row can be tall, the other short. One column will be wide, the other narrow. As you manipulate the table rows and columns, the content of the cells will move along too. As a result you can use tables to create essentially any arrangement of elements on your page. When you make the table borders invisible, the contents seem to "float" in position on the Web page. Let's see how you can use tables for Web page layout.