|
|
|
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
TR and TD also support several additional optional attributes. These attributes, and their meanings, are described in the following.
- ABBR=string (optional; not currently supported) This contains an abbreviated string corresponding to or describing the cell content, which may be rendered by the browser in place of the content, for example, when the content is used repeatedly as a heading. In the absence of this attribute, the default description is taken to be the actual content of the cell. This attribute is not supported on current browsers.
- AXIS=string (optional; not currently supported) This contains a comma-separated list of category namesthese are used to define groups of cells, where a group consists of cells that are assigned the same category name. This allows for additional description of the table content beyond that implied by the table structure. In practice, a browser may let the user query the table, for example by specially rendering those table items that share a selected category name. The value of this attribute may also be used by screen readers, which may use this label to describe the table to the listener. This attribute is not supported on current browsers.
- BACKGROUND=url (optional; not supported by Netscape Navigator 3) Specifies a background image to be used to tile the background of the cell. This attribute is supported by Internet Explorer 3 and 4 and by Netscape Navigator 4.
- BORDERCOLOR=#rrggbb or color (optional; Internet Explorer only) Specifies the desired color for the cell borderthe thinly chiseled lines drawn around each cell. It has no effect if there are no borders. This can be overridden by BORDERCOLORDARK and BORDERCOLORLIGHT.
- 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 top and left-hand side of the thinly chiseled lines drawn around each cell. It has no effect if there are no borders.
- BORDERCOLORLIGHT=#rrggbb or color (optional; Internet Explorer only) Specifies the desired color for the lighter 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 borders drawn around each cell. It has no effect if there are no borders.
- COLSPAN=number (optional) Specifies how many table columns are spanned by the cellthe default value is 1. Counting of columns starts from the left side of the table. It is the authors responsibility to ensure that the cells in each row sum to the correct number of columns.
- HEADERS=names (optional; not currently supported) Specifies a space-separated list of ID values referencing the TH heading cells that provide information, or are related to, the current table cell. For example, the markup
<TD HEADERS="ref1 ref2"> ... </TD>
- would mean that the heading cells <TH ID="ref1"> and <TH ID="ref2"> are headings appropriate to the data cell. This is designed to aid nongraphical rendering of the table (for example, by a Braille or text-to-speech browser), but may also be used by a style sheet to present cell-specific rending. See also the SCOPE attribute. This attribute is not currently supported.
- HEIGHT=number (optional) Specifies the desired height for the cell, in pixels. Note that all cells in a row must have the same height: Thus, if two cells in a row specify different heights, the larger value will be used for the entire row. Care must be taken to ensure that the cell content will fit within the specified region.
- In the absence of a HEIGHT value, the browser will determine a (hopefully) appropriate height. Note that percentage cell heights are not supported.
- NOWRAP (optional) Indicates that text lines within a cell may not wrap; the browser may not introduce line breaks between words. However, you can add BR elements to force hard line breaks, where desired. NOWRAP should be used with caution, as it can lead to extremely wide cells.
- ROWSPAN = number (optional) Specifies how many table rows are spanned by the cellthe default value is 1. Counting of rows is downward from the top of the table. It is the authors responsibility to ensure that the cells in each column sum to the correct number of rows.
- SCOPE=row, col, rowgroup, colgroup (optional; not currently supported) Specifies the set of cells for which the current heading cell provides heading information. This is designed for use in place of the HEADERS attribute, when the table is simple enough that this is possible. The value row means that the cell provides heading information for all remaining cells in the row, while col means that the cell provides heading information for all remaining cells in the column. Rowgroup means that the cell provides heading information for all remaining cells in the row group (defined by THEAD, TFOOT, or TBODY), while colgroup means that the cell provides heading information for all remaining cells in the column group (defined by COLGROUP). This attribute is not currently supported.
- WIDTH=number, or real% (optional) Specifies the desired width for the cell, in pixels or as a percentage of the full width of the table. Note that all cells in a column must have the same width; thus, if two cells specify different widths, the larger value will be used for the entire column. In the absence of a WIDTH value, the browser will determine a (hopefully) appropriate width.
NOTE: Internet Explorer 3 WIDTH Bug
Internet Explorer 3 does not properly calculate widths of table cells when percentage widths are specified.
Inclusion Elements
These elements include nontext content or data within an HTML document. In HTML 4 there are five such elements: APPLET (include a program applet), IFRAME (include a frame containing an HTML document), IMG (include an image), OBJECT (include an arbitrary data object and its software handler), and the proprietary element, EMBED. This section will only discuss APPLET and IMGthe other three are discussed in Chapter 7.
|