KnowledgeBoat Logo
|

Computer Applications

Write the difference between the colspan and rowspan attributes of an HTML table and give one example of each.

HTML Advanced Features

5 Likes

Answer

Differences between Colspan and Rowspan attributes of a table are:

S.
No.
ColspanRowspan
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.

Answered By

3 Likes


Related Questions