hitmill.com
link to hitmill.com home page

 

HTML Table Tutorial Lesson 2d
BORDERCOLOR Attribute
of the TABLE Element


 

 
BORDERCOLOR has always been one of my favorite table attributes. I use it to call attention to special text, such as an index on a "busy" page. The attribute name, BORDERCOLOR, does not use a space between border and color.
 
BORDERCOLOR is supported by Netscape 4.x and newer browsers than Internet Explorer 4.x (through the beta release of IE7.x.x). My experience with Firefox shows that is does not support bordercolor yet. Internet Explorer 4.x and 5.x colors all of the borders of the table including the cell borders. Netscape 4 only colored the outer borders.
 
The value may be a named color or a hexidecimal value, preceded by the octothorp (#). Any hexidecimal color reference will save you valuable time in finding a color you would like to try. Remember to use quotation marks with the BORDERCOLOR value. I need to mention briefly, that BORDERCOLOR is an attribute which depends upon the value of BORDER. BORDER must have a positive value greater than or equal to one in order for BORDERCOLOR to work: (If you have no border you will not need BORDERCOLOR).
 
The tables below demonstrate the use of table BORDERCOLOR.
<TABLE BORDER="3"
BORDERCOLOR="#FF6342">
This table example has a BORDER"3" and a specified BORDERCOLOR value. Note that the octothorp (pound s for the hexidecimal value is enclosed in quotes along with the value.
<TABLE BORDER="3"
BORDERCOLOR="brown">
The table to the left has a BORDER="5" and the BORDERCOLOR in this example used a named color value of "brown".
 
I want to show you a table of four cells so that you can take a peek at the inner borders:
 
BORDER="4"
BORDERCOLOR="#007FFF"
Row 2 Column 1 Row 2 Column 2

 
I am using IE7.0.x and I see that the lines in the inner borders are blue.
 
Let's go on to the next attribute.

 

 

 

 

 
Contact
 
Updated 11 April 2006
© hitmill.com
All Rights Reserved