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.

HTML 4.0 Sourcebook
(Publisher: John Wiley & Sons, Inc.)
Author(s): Ian S. Graham
ISBN: 0471257249
Publication Date: 04/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


Be careful that you allow sufficient contrast between the text and background color or else the text will not be legible.

BORDER=“number” (optional) Tells the browser to draw a box around each cell in the table and a border around the entire table. The default behavior in the absence of BORDER is a table without borders. Note that, when BORDER is not present, Netscape Navigator leaves an “invisible” padding space in place of the border—in a sense, Netscape Navigator leaves invisible borders. Internet Explorer, however, assumes zero-width “invisible” borders in this case.

The value assigned to BORDER specifies the width of the borders, in pixels—if a value is not specified, the default width value is typically 1 (this may vary from browser to browser). BORDER=“0” draws a borderless table, with zero-width assigned to the border. You should thus use BORDER=“0” to produce border-free tables that render equivalently on Internet Explorer and Netscape Navigator.

BORDERCOLOR=“#rrggbb” or “color” (optional; Internet Explorer only) Specifies the desired color for the cell border: This affects the outer, chiseled border of the table (outside the border width affected by the CELLSPACING attribute), as well as the thinly chiseled lines drawn around each cell. It has no effect if there are no borders. This is only supported by the Internet Explorer browser.

BORDERCOLORDARK=“#rrggbb” or “color” (optional; Internet Explorer only) Specifies the desired color for the darker portion of the cell border: This affects the bottom and right-hand side of the outer border of the table and the upper and left-hand side of the thinly chiseled lines drawn around each cell. It has no effect if there are no borders. This is only supported by the Internet Explorer browser.

BORDERCOLORLIGHT=“#rrggbb” or “color” (optional; Internet Explorer only) Specifies the desired color for the lighter-colored portion of the cell border: This affects the top and left-hand side of the outer border of the table, and the bottom and right-hand border drawn around each cell. It has no effect if there are no borders. This is only supported by the Internet Explorer browser.

CELLPADDING=“number” (optional) Specifies the horizontal and vertical space, in pixels, to leave between the edge of a table cell and the cell contents (image or text) on all four sides. The default value is 1.

CELLSPACING=“number” (optional) Specifies the horizontal and vertical space, in pixels, left between individual cells in a table (that is, on all four sides of a cell) —this is the “width” of the dividing lines. The default value is 2.

FRAME=“void,” “above,” “below,” “hsides,” “lhs,” “rhs,” “vsides,” “box,” “border” (optional; implemented only on Internet Explorer 3 and 4) Specifies which sides of the framing border should be rendered—this does not affect the borders drawn between table cells. The possible values and their meanings are:


FRAME Value Meaning
above draw a border only at the top of the table frame
below draw a border only at the bottom of the table frame
box (or border) draw borders on all four sides of the table frame
hsides draw borders only at the top and bottom of the table frame
lhs draw a border only on the left-hand side of the table frame
rhs draw a border only on the right-hand side of the table frame
void draw no borders for the table frame
vsides draw borders only on the left- and right-hand sides of the table frame

HEIGHT=“number,” or “real%” (optional) Prescribes the desired height of the table, either as an absolute height (number) in pixels or as a percentage height (real%) in the range 0% to 100%. Percentage heights are calculated relative to the available height: For example, if a table lies within a cell of another table, the height is calculated relative to the height of this enclosing cell. Note, however, that a browser is free to ignore these height specifications, should the table content not fit in the designated space. Note also that fixing a table to a particular height may introduce formatting difficulties, should the content not fit in the defined space.

HSPACE=“number” (optional) Specifies a horizontal padding, in pixels, to leave to the left and right of the table. This is useful for providing spacing around tables that are left- or right-aligned and is only relevant for floated tables. HSPACE has no effect on tables that are not left- or right-aligned.

RULES=“none,” “groups,” “rows,” “cols,” “all” (optional; Internet Explorer only) Specifies which cell dividing lines should be drawn within the table—this does not affect the external table border. The meanings of the five values are:


RULES Value Meaning
all draw dividing lines between all rows and all columns. A browser may use heavier lines between groups of columns or between THEAD, TFOOT, and TBODY. This is the default.
cols draw only the vertical dividing lines between columns. A browser may use heavier lines between columns grouped within a COLGROUP grouping.

RULES Value Meaning
groups draw only the borders between table groups—groups are specified by THEAD, TBODY, TFOOT, and COLGROUP.
none do not draw any interior dividing lines
rows draw only the horizontal dividing lines between table rows. A browser may use heavier lines between THEAD, TFOOT, and TBODY than between regular cells.

VSPACE=“number” (optional) Specifies the vertical padding, in pixels, to leave above and below the table. This only applies to floated (left-or right-aligned) tables and is useful for providing spacing between the table and the surrounding text.


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.