Text Links Ads : Marketing Tips Store : Search Engine Optimization Strategies
WebPosition Gold Pro : Domain Registration Bank : Optilink Software : GoDefy
Mike's Marketing Tools : Mike's Ecommerce Software : Text Links Guide
 
Web HTML-HTML.com
You are here: HTML Codes > Tables > <TABLE ...>

Attributes for <TABLE ...>
BORDERCOLOR =color expression
BORDERCOLORDARK =color expression
BORDERCOLORLIGHT =color expression

Usage Recommendation
Use it, but don't rely on it.

You may also want to check out our guide to table borders
BORDERCOLOR, BORDERCOLORLIGHT, and BORDERCOLORDARK set the colors of table borders. Netscape and MSIE both recognize BORDERCOLOR, but currently only MSIE recognizes BORDERCOLORLIGHT, and BORDERCOLORDARK.

BORDERCOLOR sets the color of all the borders for the table. So, for example, this code creates a table with red borders:

<TABLE BORDER=10 BORDERCOLOR=RED>

which gives us this table:

blah blahyeah yeah
whateverright on!

note that none of these attributes work unless you set the border size with BORDER.

MSIE and Netscape render border colors quite differently. MSIE sets all the borders to the indicated color. Netscape gives the table a 3-D appearance by setting the left and top borders to a lighter shade than the bottom and right borders. Here's a comparison of the renderings:
BrowserHow The Table Appears
MSIEMSIE rendering of BORDERCOLOR=RED
NetscapeNetscape's rendering of BORDERCOLOR=RED
MSIE allows you to individually set the light and dark borders with BORDERCOLORLIGHT, and BORDERCOLORDARK. For example, this code sets the light borders (top and left outside, bottom and right inside) borders to purple, and the dark borders (bottom and right outside, top and left insde) to green:

<TABLE BORDER=10 BORDERCOLORLIGHT=PURPLE BORDERCOLORDARK=GREEN>

which gives us this table:

blah blahyeah yeah
whateverright on!

If you use BORDERCOLORLIGHT, and BORDERCOLORDARK then MSIE ignores BORDERCOLOR. This behaviour allows you to set colors for browsers that only recognize BORDERCOLOR as well as those that recognize all three. So, for example, the following code sets a table with blue borders for those browsers that only recognize BORDERCOLOR, and sets the light borders to blue and the dark borders to a darker blue for those browsers that recognize BORDERCOLORLIGHT, and BORDERCOLOR.

<TABLE BORDER=10 
BORDERCOLOR=BLUE 
 BORDERCOLORLIGHT=BLUE BORDERCOLORDARK=#000099>

which gives us

blah blahyeah yeah
whateverright on!

<TABLE SUMMARY="..."> >>>

Copyright © 2002-8 Art Dacor USA LLC. All Rights Reserved.
3727 West Magnolia Blvd #489, Burbank, CA, 91505, USA.
www.HTML-HTML.com