HTML TABLES INDEX

Table Column Span

The attribute <COLSPAN> is used within the <TD> or <TH> tag
to span two or more columns.

The First Four Numbers
1 2
3 4

By typing this:
<TABLE BORDER=1>

<TR>
    <TH COLSPAN=2>
 The First Four Numbers</TH>
</TR>
<TR>
    <TD>1</TD>
    <TD>2</TD>
</TR>
<TR>
    <TD>3</TD> 
    <TD>4</TD>
</TR>

</TABLE>
Here's a second example.


1 2
The First Four Numbers
3 4

By typing this:
<TABLE BORDER=1>

<TR>
    <TD>1</TD>
    <TD>2</TD>
</TR>
<TR>
    <TH COLSPAN=2>
 The First Four Numbers</TH>
</TR>
<TR>
    <TD>3</TD> 
    <TD>4</TD>
</TR>

</TABLE>

  1. The colspan attribute can be used in TD and TH tags to span two or more columns.
  2. Colspan is a way to sub categorize data within a table.

Columns & Rows Rowspan