CreatingTables

Course Outline

Tables

 

Three Important Points About Tables
bulletSupport for tables is probably the most significant addition to HTML 3.
The current table specifications are at
http://www.w3.org/pub/WWW/TR/WD-tables
bulletYou can use tables to display any type of data - numbers, lists of text, images, etc. For example, the section heading for this page (Tables) is actually a table and the following object is also a table.
bulletTables can be tedious to create in HTML, but are easy to create with a WYSIWYG editor such as Front Page.


some words here

maybe
some
links

smallsun.GIF (639 bytes)

frogtiny.gif (1668 bytes)

more words

The parts of a table:

Caption

heading heading heading
column 1 column 2 column 3
This cell is in
column 1 row 3
This cell is in
column 2 row 3
This cell is in
column 3 row 3

The TABLE TAGS
TAGS ATTRIBUTES DESCRIPTIONS
<TABLE...>

</TABLE>


Creates a container for the table.
<CAPTION...>

</CAPTION>


A "title" for the table.
The caption is usually displayed centered at the top of the table.
Caption tag goes inside the Table tag.
<TR...>

</TR>


Table Row.
Tables are built row by row.
Table data and table headings go inside the table row.
<TH...>

</TH>


Table Heading.
Must only appear in a table row.
Heading cells are in a bold font.
<TD...>

</TD>


Table Data.
Must only appear within a table row.
Table data can be any HTML tag (images, links, etc.).
<TABLE BORDER Borders are drawn around all table cells.
BORDER=value specifies the thickness of the border.
BORDER=0 draws no border and removes border space.
<TABLE CELLSPACING= Amount of space between cells in a table.
Width of internal border.
<TABLE CELLPADDING= Amount of space between the border and the contents of the cell.
Adds space on all sides.
<TABLE WIDTH= The width of the table.
Specify either in % of document width or in pixels.
<TABLE ALIGN= LEFT, RIGHT
Can align entire table to the left side or right side and let text wrap beside the table.
<TR
<TD
<TH
ALIGN= LEFT, RIGHT, CENTER
Can align entire row, single cell, or heading to the left side, right side, or center of cell.
<TR
<TD
<TH
VALIGN= TOP, BOTTOM, MIDDLE
Can vertically align entire row, single cell, or heading to the top, bottom, or center of cell.
<TD
<TH
COLSPAN= Forces a cell to span multiple columns across the table.
<TD
<TH
ROWSPAN Forces a cell to span multiple rows down the table.
<TABLE
<TR
<TD
<TH
BGCOLOR Specifies a background color for the table, row, cell, or heading.
Back to top of page

Course Outline

Nancy Bryant