You can combine two or more table cells together by using the colspan attribute in a HTML table data tag . For example, a table with three rows and three columns. If we want to combine the first two cells into one cell for second row, we should use the colspan="2" attribute for the first td tag within second tr tag.
<table> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="2"> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table>
Using the above code gives you a table similar to the table shown below. As can be seen, the first cell is using two cell spots.
If you want to use first three columns to merge together for first row then use colspan value to 3 as there are three columns for this table. You will get following table as shown below.