Share this Page URL
Help

Chapter 56. Designing Data Tables > Adjusting Cellpadding and Cellspacing - Pg. 263

Designing Data Tables 263 You'll notice that a row that includes a colspanned or rowspanned cell seems to be missing some markup. For example, in the first row of the data table in Figure 56.2, you find three table cells: <tr> <th>&nbsp;</th> <th>&nbsp;</th> <th colspan="2">Border Color</th> </tr> TIP A single table cell can contain both colspan and rowspan attributes. The very next row has four table cells: <tr> <th>&nbsp;</th> <th>x</th> <th>Before</th> <th>After</th> </tr> The missing code in the first row is perfectly normal. In fact, this is the way it needs to be. The table cell with the colspan of 2 counts as two cells, not one, in which case both rows have four table cells after all. Another point of note: The colgroup tags at the top of the table show the following structure: <colgroup span="2"></colgroup> <colgroup span="2"></colgroup>