How to have a table cell that spans two columns in HTML?

 Posted by Pgayath on 9/21/2012 | Category: HTML 5 Interview questions | Views: 1144 | Points: 40

The <colspan> tag inside a <th> or <td> tag is used to span the columns.
Let us see an example.



<h4>Cell that spans two columns:</h4>
<table border="1">
<th colspan="2">Telephone</th>
<td>Charles Babbage</td>
<td>555 89 123</td>
<td>555 98 321</td>

| Alert Moderator 

Comments or Responses

Login to post response