3.3 HTML 4.01 Test: colspan attribute for TD and TH

Test case: http://www.w3.org/MarkUp/Test/HTML401/current/tests/11_2_6-BF-02.html

The specification states:

 colspan = number [CN] 
 This attribute specifies the number of columns spanned by the current cell. The 
 default value of this attribute is one ("1"). The value zero ("0") means that the 
 cell spans all columns from the current column to the last column of the column 
 group (COLGROUP) in which the cell is defined.

The test case states:

Verify the functionality of the colspan attribute for TD and TH.

Table code:

<table border="1">

<tr><td>column 1</td><td>column 2</td><td>column 3</td></tr>


<tr><td colspan="0">zero</td></tr>

<tr><td colspan="1">one</td></tr>

<tr><td colspan="2">two</td></tr>

<tr><td colspan="3">three</td></tr>


<table border="1">

<tr><th>column 1</th><th>column 2</th><th>column 3</th></tr>


<tr><th colspan="0">zero</th></tr>

<tr><th colspan="1">one</th></tr>

<tr><th colspan="2">two</th></tr>

<tr><th colspan="3">three</th></tr>


Expected results:

The third row (<td rowspan="0">zero</td>, <th colspan="0">zero</th>) should span all three columns.

Actual results for all document modes (all versions):

The third row spans only one column.


The value of the colspan attribute for the table cell is set to 0 (zero). A value of 0 implies that the table cell should span all columns.

Based on the actual results, Internet Explorer fails this test case for all document modes (all versions).

See Also

Section 2.1.17