Tuesday, May 12, 2009

Colspan And Row Span in Table


Column Span extends cells on a horizontal row (left and right). The line to add for Column Span is COLSPAN="X". This line adds onto the cell so the final result would look like this. <TD COLSPAN=2 or 3 etc.>


Examples Colspan


<HTML>
<BODY>
<TABLE BORDER="1">
<TR> <TD> Cell 1 </TD> <TD> Cell 2 </TD> </TR>
<TR> <TD COLSPAN="2"> Cell 3 </TD> </TR>
</TABLE>
</BODY>

Examples Rowspan


<HTML>
<BODY>
<TABLE BORDER="1">
<TR> <TD ROWSPAN="2"> Cell 1 </TD>
<TD> Cell 2 </TD> </TR> <TR> <TD> Cell 3 </TD> </TR>
</TABLE>
</BODY>

No response to “Colspan And Row Span in Table”

Post a Comment