HTML table td colspan

Techno HTML5

Colspan is used to how many numbers of columns should be used.
In simple words, we used the colspan to take the more column size (width)
Example-
if we declare colspan="1" then column increase one column size .and if declare <td colspan="4"> then column takes the size of four columns .
The following example of a table in which we will use the colspan 2.


HTML td Colspan


<!DOCTYPE>
<html>
<head>
<title>Type of Heading Tags </title>
</head>
<body>
<table height="150" width="500" border="1">  
<tr> 
<td colspan="2"> Employee Data </td>
<tr>
<td> 
Employee
</td>
<td>
Salary
</td> 
</tr> 
<tr>
<td>
Shiva
</td>
<td> 
20000
</td>  
</tr>
<tr>
<td> 
NEHA
</td>
<td> 
12000
</td>  
</tr>
</table>

</body>
</head>
</html>
Run

Note- The HTML td colspan is set to 2.