webmaster resources tips and articles
webmaster information

Path = Home : HTML Design Tips : How To Add Color To Table Borders

How To Add Color To Table Borders

 

The <table> tag is the HTML tag which is used to create a table within a web page.

You can add color to your table borders by adding bordercolor="hex value " or bordercolor="color name" within your <table> tag.

Setting the table border color using a hex value

<table width="460" border="2" bordercolor="#FF0000" cellpadding="2" cellspacing="2">
<TR>
<TD>Column 1</TD>
<TD>Column 2</TD>
</TR>
</TABLE>

Column 1 Column 2

 

Setting the table border color using a color name

Instead of using the hex value for the color, you can use the color name instead - though of course you can only do this for colors that have names.

<table width="460" border="2" bordercolor="red" cellpadding="2" cellspacing="2">
<TR>
<TD>Column 1</TD>
<TD>Column 2</TD>
</TR>
</TABLE>

Column 1 Column 2

 


 

 

© janim.net 2000 - 2008 All rights reserved