Computer Science, asked by shivam9555, 1 year ago

what is the function of rowspan and colspan????​

Answers

Answered by riya2280
10


The rowspan and colspan are <td> tag attributes. These are used to specify the number of rows or columns a cell should span. The rowspan attribute is for rows as well as the colspan attribute is for columns.

These attributes have numeric values, for example, colspan=3 will span three columns.

You can try to run the following code to work with the rowspan and colspan attribute in HTML

Example

Live Demo

<html>

<head>

<style>

table, th, td {

border: 1px solid black;

width: 100px;

height: 50px;

}

</style>

</head>

<body>

<h1>Heading</h1>

<table>

<tr>

<th colspan="2"></th>

<th></th>

</tr>

<tr>

<td></td>

<td></td>

<td rowspan="3"></td>

</tr>

<tr>

<td></td>

<td></td>

</tr>

<tr>

<td></td>

<td></td>

</tr>

</table>

</body>

</html>

shivam9555: hiii riya
shivam9555: hw r u
riya2280: hi
shivam9555: ummm
shivam9555: in which class u r
Similar questions