HTML and CSS Reference
Before style sheets were invented and implemented in most browsers, there was only one
way to lay out elements on a page other than straight down the middle: tables. These
days, developers use CSS to lay out pages, but before CSS support in browsers became
really solid, tables were the key page layout tool that most web developers used.
Even now, there are some cases where using tables to lay out pages make sense. The web
browsers in some mobile devices do not support CSS, so if you want to lay out your
pages with columns, you must use tables. Similarly, if you are creating a web page that
will be sent out as part of an email message, tables should be used. Some email clients
do not support CSS, and so for more advanced layouts you're required to use tables.
In this lesson, you learned quite a lot about tables. They enable you to arrange your
information in rows and columns so that your visitors can get to the information they
While working with tables, you learned about headings and data, captions, defining rows
and cells, aligning information within cells, and creating cells that span multiple rows or
columns. With these features, you can create tables for most purposes.
As you're constructing tables, it's helpful to keep the following steps in mind:
Sketch your table, indicating where the rows and columns fall. Mark which cells
span multiple rows and columns.
Start with a basic framework and lay out the rows, headings, and data row by row
and cell by cell in HTML. Include row and column spans as necessary. Test fre-
quently in a browser to make sure that it's all working correctly.
Modify the alignment in the rows to reflect the alignment of the majority of the
Modify the alignment for individual cells.
Adjust line breaks, if necessary.
Make other refinements such as cell spacing, padding, or color.
Test your table in multiple browsers. Different browsers might have different
approaches to laying out your table or might be more accepting of errors in your
Table 10.2 presents a quick summary of the HTML elements that you learned about in
this lesson, and which remain current in HTML 4.01.