60 likes | 235 Views
The Table. Tables begin and end with the <TABLE> and </TABLE> tags. Tables are composed of rows, each of which starts and stops with <TR> and </TR> tags. Each row may contain header cells <TH>, and </TH> Each row may contain data cells <TD>, and </TD>
E N D
The Table • Tables begin and end with the <TABLE> and </TABLE> tags. • Tables are composed of rows, each of which starts and stops with <TR> and </TR> tags. • Each row may contain header cells <TH>, and </TH> • Each row may contain data cells <TD>, and </TD> • Each cell may contain virtually anything, even other tables (this is called nesting tables).
Example Table <TABLE> <TR> (Table Row) <TH> Table heading 1</TH><TH>Table Heading 2</TH> </TR>(End Table Row) <TR> <TD> Table data 1</TD><TD> Table data 2</TD> </TR> </TABLE> Table Heading 1 Table Heading 1 Table Data 1 Table Data 2
The <Table> Tag • <TABLE> • ALIGN – TABLE ALIGNMENT ON PAGE • BACKGROUND – ALLOWS A BACKGROUND IMAGE (MS IE ONLY) • BGCOLOR – ALLOWS A BACKGROUND COLOR • BORDER – SET BORDER SIZE IN PIXELS. • BORDERCOLOR – SETS BORDERCOLOR (MS IE ONLY) • BORDERCOLORLIGHT - (MS IE ONLY) • BORDERCOLORDARK - (MS IE ONLY) • CELLPADDING • CELLSPACING • CLASS • COLS • FRAME - (MS IE ONLY) • HEIGHT • HSPACE (CONTINUED ON NEXT SLIDE)
The <Table> Tag • <TABLE> • NOWRAP - (MS IE ONLY) • STYLE • RULES - (MS IE ONLY) • VALIGN - (MS IE ONLY) • VSPACE • WIDTH
The <TR> Tag • <TR></TR> • ALIGN • BGCOLOR • BORDERCOLOR • BORDERCOLORLIGHT • BORDERCOLCORDARK • CLASS • NOWRAP • STYLE • VALIGN
The <TH> and <TD> Tags • <TH></TH> OR <TD></TD> • ALIGN • BACKGROUND • BGCOLOR • BORDERCOLOR • BORDERCOLORLIGHT • BORDERCOLCORDARK • CLASS • COLSPAN • HEIGHT • NOWRAP • ROWSPAN • STYLE • VALIGN • WIDTH