• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. Creating Tables > Spanning Columns

Spanning Columns

Just as you can span rows, you can span columns. You use the colspan attribute in table header or table cells (see Example 4-11).

Example 4-11. Spanning columns within a table header

<table width="90%" border="1" cellspacing="5" cellpadding="5" summary="This table 
demonstrates colspan">
<caption>Demonstrating colspan</caption>
<tr>
<th colspan=2">Header (spans 2 columns)</th>
<th>Header (no span)</th>
</tr>
<tr>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
<tr>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
</table>

					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint