A TABLE in HTML is used just like a table in a standard word
processor. It is a group of cels, arranged into rows (items that go horizonally across the
page) and columns (groups that go vertically down the page). Tables can be used to arrange
textual information on the page OR to arrange text and graphics on the page. Use them for
data display with or without borders; to provide side-by-side columns of text as in a
spread-sheet; to layout graphics in one column and a text definition in a side-by-side
column; to wrap text around a graphic; or to border a text area with graphics.
Using a table without borders to layout a page gives the designer greater control of where
elements will (almost)always appear on the page.
Table Tags & Attributes |
||
| <Tags> | Name Of Tag | Use of the Tag |
|---|---|---|
| <table> | Table Tag | Indicates a table |
| <tr> | Table Row | Defines a table row |
| <th> | Table Header | Defines a table cell containing a heading, the end th tag is Optional |
| <td> | Table Datum | Defines a table cell containing data, the end td tag is Optional |
| <caption> | Caption Tag | Creates an optional caption for the table |
| Attributes | Where used | Use of Tag |
| border | <table> | Displays the table with a border, a value applied to the border is the width of that border |
| align | <caption> <tr> <th> or <td> | Used to align |
Source of this table is http://students.assumption.edu:80/users/jandolin/tables.html
| <TABLE ...></TABLE> | This is the main wrapper for all the other table tags, and other table tags will be ignored if they aren't wrapped inside of a TABLE tag. By default tables have no borders, borders will be added if the BORDER attribute is specified. |
|---|---|
| <TR ...></TR> | This stands for table row. The number of rows in a table is exactly specified by how many TR tags are contained within it, irregardless of cells that may attempt to use the ROWSPAN attribute to span into non-specified rows. TR can have both the ALIGN and VALIGN attributes, which if specified become the default alignments for all cells in this row. |
| <TD ...></TD> | This stands for table data, and specifies a standard table data cell. Table data cells must only appear within table rows. Each row need not have the same number of cells specified as short rows will be padded with blank cells on the right. A cell can contain any of the HTML tags normally present in the body of an HTML document. The default alignment of table data is ALIGN=left and VALIGN=middle. These alignments are overridden by any alignments specified in the containing TR tag, and those alignments in turn are overridden by any ALIGN or VALIGN attributes explicitly specified on this cell. By default lines inside of table cells can be broken up to fit within the overall cell width. Specifying the NOWRAP attribute for a TD prevents linebreaking for that cell. |
| <TH ...></TH> | This stands for table header. Header cells are identical to data cells in all respects, with the exception that header cells are in a bold font, and have a default ALIGN=center. |
| <CAPTION ...></CAPTION> | This represents the caption for a table. CAPTION tags should appear inside the TABLE but not inside table rows or cells. The caption accepts an alignment attribute that defaults to ALIGN=top but can be explicitly set to ALIGN=bottom. Like table cells, any document body HTML can appear in a caption. Captions are always horizontally centered with respect to the table, and the may have their lines broken to fit within the width of the table. |
Source of this table is: The Table Tags - http://www.practical-inet.com.:80/web-training/tbltags.htm
Return to Creative Web Page
Table source is: College of DuPage Faculty Directory standardized format.