Working with Colspans and Rowspans

Colspans and rowspans are the bane of layout tables, because they cause all sorts of strange breakage problems. These attributes come in handy for data tables, though, because that's what the people who dreamed up HTML designed colspans and rowspans for.

Technically speaking, the colspan attribute determines how many columns a particular table cell spans or straddles, while the rowspan attribute determines the number of spanned rows. The best way to understand how colspans and rowspans work is to look at an example, which Figure 56.2 provides.

Figure 56.2. This data table uses the colspan and rowspan attributes.

GEEKSPEAK

The colspan attribute determines how many columns a table cell ...

Get Web Design Garage now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.