CBSE Class 10 Computer Applications
Question 20 of 31
Sample Question Paper — Question 8
Back to all questions 8
Question Question 18(i)
Write the difference between the colspan and rowspan attributes of an HTML table and give one example of each.
Differences between Colspan and Rowspan attributes of a table are:
| S. No. | Colspan | Rowspan |
|---|---|---|
| 1. | COLSPAN is used to combine the cells horizontally. It specifies the number of columns that the cells span across and shows them as a single cell. | ROWSPAN is used to combine the cells vertically. It merges the number of cells vertically and displays them as a single cell. |
| 2. | E.g. <TD Colspan = "4"> where 4 is the number of columns that the cells span across. | E.g. <TD Rowspan = "3"> where 3 is the number of rows that the cells span across. |