Merge Table Columns - Html

How to merge two columns in html table?

Snippet Code


  
Rate this page :
  [ 0 votes]

Column span helps you to merge two or more cells horizontally in a table. This code will merge the cells across the rows. Consider we have three rows and two columns. To span the cells horizontally, use the code given below.

<table border='1' align='center'> <caption>Merge Table Columns</caption> <tr> <td colspan=3>First Row Data</td> </tr> <tr> <td>Second Row Data 1</td><td>Data 1</td> <td>Data 2</td> </tr> </table>

Tags


Ask Questions

Ask Question