Register for EarthWeb's Million Dollar Sweepstakes!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Platinum Edition Using HTML 4, XML, and Java 1.2
(Publisher: Macmillan Computer Publishing)
Author(s): Eric Ladd
ISBN: 078971759x
Publication Date: 11/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


Table 3.4 Values of the FRAME Attribute of the <TABLE> Tag

Value Purpose

ABOVE Displays a border on the top of a table frame
BELOW Displays a border at the bottom of a table frame
BORDER Displays a border on all four sides of a table frame
BOX Same as BORDER
HSIDES Displays a border on the left and right sides of a table frame
LHS Displays a border on the left side of a table frame
RHS Displays a border on the right side of a table frame
VSIDES Displays a border at the top and bottom of a table frame
VOID Suppresses the display of all table frame borders

  RULES—Controls which parts of the table’s inner borders are displayed. RULES can be set equal to one of the values shown in Table 3.5.
Table 3.5 Values of the RULES Attribute of the <TABLE> Tag

Value Purpose

ALL Displays a border between all rows and columns
COLS Displays a border between all columns
GROUPS Displays a border between all logical groups (as defined by the <THEAD>, <TBODY>, <TFOOT>, and <COLGROUP> tags)
NONE Suppresses all inner borders
ROWS Displays a border between all table rows

  SUMMARY—Provides a synopsis of what’s in the table and how the table is structured.
  WIDTH—Specifies the width of the table in pixels or as a percentage of the browser screen width.

Example:

<TABLE BORDER=2 CELLPADDING=4 FRAME=BORDER RULES=ALL ALIGN=CENTER>
...
</TABLE>

Related Tags:

The <TABLE> and </TABLE> tags form the container for all the other table-related tags. The many tags you can use between <TABLE> and </TABLE> include <CAPTION>, <THEAD>, <TFOOT>, <TBODY>, <COLGROUP>, <COL>, <TR>, <TH>, and <TD>.

<CAPTION>

Type:

Container

Function:

Specifies a caption for a table.

Syntax:

<CAPTION ALIGN=”TOP|BOTTOM|LEFT|RIGHT”>
... caption text goes here ...
</CAPTION>

Attributes:

The ALIGN attribute gives you fine control over how the caption is placed. Setting ALIGN to TOP or BOTTOM places the caption above or below the table, respectively. Using LEFT or RIGHT floats the caption in the left or right margin. The ALIGN attribute has been deprecated in HTML 4.0.

Example:

<CAPTION ALIGN=”BOTTOM”>
Table 1 - Return on Investment
</CAPTION>

<THEAD>

Type:

Container

Function:

Defines the header section of a table. Being able to define the header separately enables the browser to duplicate the header when breaking the table across multiple pages.

Syntax:

<THEAD ALIGN=”LEFT|CENTER|RIGHT|JUSTIFY|CHAR”
 VALIGN=”TOP|MIDDLE|BOTTOM|BASELINE” CHAR=”alignment_character”
 CHAROFF=”alignment_character_offset”>
... rows that comprise the header ...
</THEAD>

Attributes:

The <THEAD> tag can take the following four attributes:

  ALIGN—Controls the horizontal alignment within the cells of the table header. ALIGN can take on values of LEFT, RIGHT, CENTER, JUSTIFY, or CHAR.CHAR is used to align cells by a common character.
  CHAR—Specifies the alignment character for when ALIGN=”CHAR” is used.
  CHAROFF—Prescribes the offset distance from the alignment character.
  VALIGN—Controls the vertical alignment in the header cells. VALIGN can take on values of TOP, MIDDLE, BOTTOM, or BASELINE.

Example:

<THEAD ALIGN=”CENTER” VALIGN=”BASELINE”>
<TR>
<TH>ID #</TH>
<TH>Property</TH>
<TH>Tax Assessment</TH>
...
</TR>
</THEAD>

Related Tags:

The rows of the table header are built with <TR>, <TH>, and <TD> tags. Each table header must comprise at least one row.

<TFOOT>

Type:

Container

Function:

Defines the footer section of the table.

Syntax:

<TFOOT ALIGN=”LEFT|CENTER|RIGHT|JUSTIFY|CHAR”
 VALIGN=”TOP|MIDDLE|BOTTOM|BASELINE” CHAR=”alignment_character”
 CHAROFF=”alignment_character_offset”>
...
</TFOOT>

Attributes:

<TFOOT> can take the same ALIGN and VALIGN attributes as the <THEAD> tag:

  ALIGN—Controls the horizontal alignment within the cells of the table footer. ALIGN can take on values of LEFT, RIGHT, CENTER, JUSTIFY, or CHAR.
  CHAR—Specifies the alignment character for when ALIGN=”CHAR” is used.
  CHAROFF—Prescribes the offset distance from the alignment character.
  VALIGN—Controls the vertical alignment in the footer cells. VALIGN can take on values of TOP, MIDDLE, BOTTOM, or BASELINE.

Example:

<TFOOT ALIGN=”JUSTIFY” VALIGN=”TOP”>
<TR>
<TD>&copy; 1998 - Macmillan Computer Publishing USA</TD>
...
</TR>
</TFOOT>

Related Tags:

You specify the rows and cells in the table footer by using the <TR>, <TH>, and <TD> tags. A table footer must be made up of at least one row.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.