/

HTML / CSS / JavaScript Tutorial

HTML Standard attribute: colspan

[this page | pdf | back links]

The HTML colspan attribute indicates the number of columns a table cell should span. It applies to <td> and <th> elements.

 

A value of zero, i.e. using colspan="0", in theory has a special meaning, namely that the cell should be spanned to the last column of the column group, but this is not recognised by some browsers.

 

Valid attribute values (when used with <td> and <th> element) include:

 

Value

Description

integer

Number of columns a cell should span

 


NAVIGATION LINKS
Contents | Prev | Next | HTML Attributes


Desktop view | Switch to Mobile