TYPE THE DOCUMENT TITLE 73 align" - left, center, right
- specifies the horizontal alignment of the contents of a cell. valign="" - top, middle,
bottom - specifies the vertical alignment of the contents of a cell. bgcolor="#hexValue"
- specifies the color of the background of the cell must use hexadecimal HTML color values as usual. background="imageURL" - specifies an image to be used as the background of the cell.
| PURPOSE Defines a table data cell within the table row. NOTE A data cell must be placed inside a table row.
*** Attributes *** align" - left, center, right
- specifies the horizontal alignment of the contents of a cell. valign="" - top, middle, bottom
- specifies the vertical alignment of the contents of a cell. colspan="#"
- specifies the number of columns a cell will expand represented by #. rowspan="#"
- specifies the number of rows a cell will expand represented by #. nowrap
- eliminates word wrapping in a cell. width"
- specifies the width of the cell. (pixel or percentage values) represented by #. height"
- specifies the height of the cell. (pixel of percentage values) represented by #. bgcolor="#hexValue"
- specifies the color of the background of the cell must use hexadecimal HTML color values as usual. background="imageURL" - specifies an image to be used as the background of the cell.
Empty Cells in a Table Table cells with no content are not displayed very well inmost browsers.
row 1, cell 1 |
TYPE THE DOCUMENT TITLE
74
row 1, cell 2 |
row 2, cell 1 |
|
How it looks in a browser row 1, cell 1 row 1, cell 2 row 2, cell 1 Note that the borders around the empty table cell are missing (NB Mozilla Firefox displays the border.
To avoid this, add a non-breaking space ( ) to empty data cells,
to make the borders visible
row 1, cell 1 |
row 1, cell 2 |
row 2, cell 1 |
|
How it looks in a browser row 1, cell 1 row 1, cell 2 row 2, cell 1 The followings are examples illustrating how tables can be used to provide structure to web documents. Tabular structure,
complex web page structure, border tricks, and complex web page structure with a navigational menu are emphasized.
Example 1: (simple table display for tabular information)
Example Table
color="#FFFFFF">Heading 1 |
TYPE THE DOCUMENT TITLE 75 color="#FFFFFF">Heading 2 |
Text A |
Text B |
Text C |
Text D |
Text E |
Text F |
Text G |