150 likes | 162 Views
Learn how to create a table with different cell structures and formatting using HTML code. Understand row and column spans, cell color, and alignment.
E N D
1 COLUMN 1 ROW
Browser View My Schedule
<TR> <TD> 1</TD> <TD> 2</TD> </TR>
<TR> <TH>1</TH> <TH>2</TH> </TR> <TR> <TD>3 </TD> <TD>4</TD> </TR>
two rows The General Table Syntax <table> <tr> <td> First Cell </td> <td> Second Cell </td> </tr> <tr> <td> Third Cell </td> <td> Fourth Cell </td> </tr> </table> two columns
four table cells in the first row only three table cells are required for the second and third rows HTML code resulting table A Table Structure with a Row-Spanning Cell
<TR><TH COLSPAN="2“>TABLE TITLE</TH> </TR><TR> <TD>Column A</TD> <TD>Column B</TD> </TR><TR > <TD>Data 1</TD> <TD>Data 2</TD> </TR>
<TR> <TH ROWSPAN="2“ >TABLE HEADER</TH> <TR> <TD>TABLE CELL 1 </TR> <TR> <TD>TABLE CELL 2</TD> </TR>
<TR> <TD COLSPAN=4 >The Brady Bunch </TD> <TR> <TD ROWSPAN=3 >Cast <TD>Marcia <TD>Carol <TD>Greg </TR> <TR> <TD>Jan <TD>Alice <TD>Peter <TR> <TD>Cindy <TD>Mike <TD>Bobby
table header Browser View align center cellspacing tableborder columnspan cell padding
Row Color <HTML><HEAD> <TITLE>Simple Table</TITLE> </HEAD><BODY> <TABLE BORDER=3 CELLPADDING=3 ALIGN=CENTER> <TR BGCOLOR=YELLOW> <TD COLSPAN=3 ALIGN=CENTER >The Brady Bunch <TR><TD>Marcia<TD>Carol<TD>Greg <TR><TD>Jan<TD>Alice<TD>Peter <TR><TD>Cindy<TD>Mike<TD>Bobby </TABLE> </BODY></HTML>
Cell Color <HTML><HEAD> <TITLE>Simple Table</TITLE> </HEAD><BODY> <TABLE BORDER=3 CELLPADDING=3 ALIGN=CENTER> <TR><TD COLSPAN=3 ALIGN=CENTER>The Brady Bunch <TR><TD>Marcia<TD>Carol<TD>Greg <TR><TD>Jan <TD BGCOLOR=PINK>Alice<TD>Peter <TR><TD>Cindy<TD>Mike<TD>Bobby </TABLE> </BODY></HTML>