Hypertext Markup Language Table 11th Lecture 13, June, 2010 Baseer Ahmad Baheer
The data could be arranged in a table. This table uses the basic three tags all tables must have: <TABLE ...> <TABLE ...> creates the table. Most of the overall properties of the table are defined here, such as if it has borders and what is the table's background color. <TR ...> <TR ...> (Table Row) defines each row of the table. <TD ...> <TD ...> (Table Data) defines each cell of the table.
Headers
<TH ...> can be used to create headers for either rows or columns, or both.
CELLPADDING and CELLSPACING By default, table cells tend to be squeezed close to each other. To give your table cells a little more breathing room, use CELLPADDING and CELLSPACING.
COLSPAN and ROWSPAN Table cells can span across more than one column or row. The attributes COLSPAN ("how many across") and ROWSPAN ("how many down") indicate how many columns or rows a cell should take up.
Background Color
Table Borders:The Basics
Table Borders: BORDER, FRAME and RULES
Table Borders: No inside BORDER
Table Borders: Just Rows or Just Columns
Table Borders: Borders Between Groups of Rows Sometimes the table looks better if there are borders only between groups of rows. To do this we'll use some HTML 4.0 markup added just for that purpose. Note that currently only MSIE supports borders between groups of rows. <THEAD ...> designates the head section which is usually where you put column headers. <TBODY ...> indicates the main body of the table. <TFOOT ...> sets the bottom section where you put totals and other summary information.
Table Borders: Between Groups of Columns
Table Borders: Colors
Table Borders: Light and Dark
Table Borders: All Three Border Color Attributes At Once
References