ptg16476052
248 LESSON 10: Building Tables
▼Exercise 10.1: Creating a Simple Table
Now that you know the basics of how to create a table, try a simple example. You’ll
create a table that indicates the colors you get when you mix the three primary colors
together. Figure 10.4 shows the table you’re going to re-create in this example.
Here’s a quick hint for laying out tables: Because HTML defines tables on a row-by-row
basis, sometimes it can be difficult to keep track of the columns, particularly with com-
plex tables. Before you start actually writing HTML code, it’s useful to make a sketch of
your table so that you know the heads and the values of each cell. You might even find
that it’s easiest to use a word processor with a table editor (such as Microsoft Word) or
a spreadsheet to lay out your tables. Then, when you have the layout and the cell values ,
you can write the HTML code for that table. Eventually, if you do this enough, you’ll
think of these things in terms of HTML tags, whether you want to or not.
FIGURE 10.3
A visible details
area.
FIGURE 10.4
A simple color
table.
▼