To make a cell span more than one column, use the colspan attribute with the number of columns to span:
HTML file: | Displayed by browser: | ||||||
---|---|---|---|---|---|---|---|
<h3>Telephone Spans 2 Columns</h3>
<table> <tr> <th>Name</th> <th colspan="2">Telephone</th> </tr> <tr> <td>Bill Gates</td> <td>555 77 854</td> <td>555 77 855</td> </tr> </table> |
Telephone Spans 2 Columns
|
I tried doing this as a CSS styling (style="colspan:2px;"), but it doesn't work.