Computer Science, asked by meettekwani7, 7 months ago

This attribute of the <td> tag
is used to merge cells across
columns in HTML.​

Answers

Answered by rupam83
0

Answer:

To merge table columns in HTML use the colspan attribute in <td> tag. With this, merge cells with each other. For example, if your table is having 4 rows and 4 columns, then with colspan attribute, you can easily merge 2 or even 3 of the table cells.

Explanation:

<!DOCTYPE html>

<html>

<head>

<style>

table, th, td {

border: 1px solid black;

width: 100px;

height: 50px;

}

</style>

</head>

<body>

<h1>Heading</h1>

<table>

<tr>

<th></th>

<th></th>

<th></th>

</tr>

<tr>

<td colspan="2"></td>

<td></td>

</tr>

<tr>

<td></td>

<td></td>

<td></td>

</tr>

</table>

</body>

</html>

Similar questions