40 likes | 55 Views
Learn how to use rowspan and colspan attributes to create complex tables with cells spanning multiple rows and columns. Understand the differences between rowspan and colspan and how to apply them effectively.
E N D
Creating Tables Using rowspan and colspan attributes
Introduction • By default a cell appears in one row and one column. However using rowspan and colspan attribute on individual cell <td> tag, you can cause a cell to span multiple rows and columns. • When using rowspan and/or colspan attribute, always remember where the cell starts.
Rowspan Attribute • Rowspan causes a cell to stretch downward to the rows below • If you want to make a cell go across several rows, use rowspan attribute with the <td> tag. • Rowspan can only extend a cell into the next row if there is room in that row 1 2 3 4 5 6
Colspan causes a cell to extend to the right into columns on the right. If you want to make a cell go across several columns, use colspan attribute with the <td> tag. Colspan can only extend a cell into the next column if there is room in that column Colspan Attribute 1 2 3 4 5 6