You are on page 1of 3

Qus:

Create a table using rowspan and columnspan


attributes.

Sol:
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
font-size:50px;
padding:20px;
margin:20px;
}
</style>
</head>
<title>Table
</title>
<body>
<table>
<tr>
<td><strong>A</strong></td>
<td><strong>B</strong></td>
<td><strong>C</strong></td>
<td><strong>D</strong></td>
</tr>

<tr>
<td rowspan=2>1</td>
<td>2</td>
<td colspan=2>3</td>
</tr>
<tr>
<td colspan=2>4</td>
<td rowspan=2>5</td>
</tr>
<tr>
<td>6</td>
<td>7</td>
<td>8</td>
</tr>
<tr>
<td colspan=2>9</td>
<td>10</td>
<td>11</td>
</tr>
</table>
</body>
</html>

OUTPUT:

You might also like