Webmaster in a Nutshell

Previous Chapter 5 Next
 

5.5 Internet Explorer Tables

Beginning with version 2.0, Internet Explorer added a number of attributes to its table tags. These attributes let you set colors for the backgrounds and borders of table elements. They can be used to set values for the whole table, individual rows, and individual cells. Values can be set in a nested fashion, so that a specification for a single cell can override the broader setting for its row or the whole table.

Each attribute accepts a value specified as either an RGB color value or a standard color name, both of which are described in Chapter 6, Color Names and Values.

The bgcolor attribute is used to set the background color of cells within a table. You can set a single background color for the whole table, or specify different colors for individual rows and cells. This functionality is also available in Netscape 3.0.

Similar to setting a background color, both Navigator and Internet Explorer allow you to set a background image for the entire table or individual cells. The image will automatically be tiled behind the appropriate table element. The value of the background attribute is the URL of the image file.

Borders in Netscape and Internet Explorer create a 3-D effect by using three differently colored strips. There is a thick center strip with much thinner strips on each side. One of the outer strips is colored darker than the center strip, and one is lighter, producing a shadowed effect. Internet Explorer allows you to set the colors for each of these elements when you have borders turned on with the border attribute in the <table> tag.

The bordercolor attribute sets the color of the main center strip of a border.

The bordercolorlight attribute sets the color of the light strip of a border, the top- or left-most strip. bordercolordark sets the color of the dark strip, the bottom or right-most strip.

You needn't specify all three border colors. The default for Internet Explorer's table borders sets the lighter and darker strips about 25% brighter and darker than the main border color.

A number of other formatting options are available in Internet Explorer. These include setting header and footer rows, grouping columns, and controlling where rules are drawn in the table. These tags include: <col>, <colgroup>, <tbody>, <thead>, <tfoot>, and the rules and frame attributes of the <table> tag.


Previous Home Next
The <th> and <td> Tags Book Index Color Names and Values