|
<TH>Name
</TH> <TH Valign="Bottom">Grades </TH> </TR> <TR> <TD>1. </TD> <TD>Manas </TD> <TD>A+ </TD> </TR> <TR> <TD>2. </TD> <TD>Dhiraj </TD> <TD>A </TD> </TR> </TABLE> </BODY> </HTML> |
You can combine two or more cells either column-wise or row-wise to convert them into a single cell. It is useful for displaying headings and titles in consecutive rows or columns.
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.
Example: <TD Colspan=4> where 4 is the number of columns that the cells span across.
ROWSPAN is used to combine the cells vertically. It merges the number of cells vertically and displays them as single cell.
Example: <TD Rowspan=3> where 3 is the number of rows that the cells span across.
|
<HTML> <HEAD> <TITLE>Spanning </TITLE> </HEAD> <BODY Bgcolor="Lightyellow"> <TABLE Border=5 bordercolor="Red"> <TR> <TH Colspan=4 Align="Center">Class 10th </TH> </TR> <TR> <TH Rowspan=3>Details </TH> <TH>S.NO </TH> <TH>Name </TH> <TH>Grades </TH> </TR> <TR> <TD>1. </TD> <TD>Manas </TD> <TD>A+ </TD> </TR> <TR> <TD>2. </TD> <TD>Dhiraj </TD> <TD>A </TD> </TR> </TABLE> </BODY> </HTML> |
Learning computers with K ips