Web Design Stuff
HTML Tutorials    CSS Tutorials    Web Hosting   Resources
Create a Web Page 101
Making Web Pages Intro What is a Web Page? Why Make a Web Page? The History of HTML Learn HTML or XHTML?
Basic HTML
Basic HTML Tutorials Basic HTML Necessities How to Make a Web Page How to Edit a Web Page The Basics of HTML Tags Basic HTML Page Structure HTML Attributes
HTML Font Codes
HTML Font Codes Intro HTML Font Color Codes HTML Font Size Codes HTML Font Style Codes HTML Bold/Italic Codes Combining Font Codes
Formatting Text
Formatting Text Intro Making Paragraphs Miscellaneous Formatting Headings & Subheadings Creating Hyperlinks
Using Graphics
Using Graphics on the Web Add Graphics to Your Pages Graphics and Accessibility How to Align Graphics Page Color & Background Graphics as Hyperlinks Horizontal Rules
Creating Tables
HTML Tables Tutorials HTML Table Fundamentals Background & Border Color Table Frames & Rules Table Width and Alignment Cells 1 -Space & Alignment Cells 2 -Row Column Span Cells 3 -Width & Height
Making Lists
HTML Lists Tutorials Bulleted Lists Numbered Lists Definition Lists
HTML Frames
HTML Frames Tutorials Using Frames for Layout Advanced Frame Layouts Putting Hyperlinks in Frames Frame Border Width Color, Margin and Control Problems with Frames SmartFrames: A Solution SSI: An Alternative to Frames
Web Page Forms
Making Feedback Forms A Simple Feedback Form Installing NMS FormMail Debugging Your Setup My Web Host is Out to Lunch User Input Components Text Fields Checkboxes & Radio Buttons Dropdown Menus Push Buttons Layout and Presentation
Basic CSS
Basic CSS Tutorials What is CSS? Why You Should Use CSS How to Use CSS Inline Styles Embedded Style Sheets External Style Sheets Class Selectors ID Selectors Combining Selectors
CSS Properties
CSS Properties Intro Font Styles Width, Height & Spacing Borders Backgrounds Position Float & Alignment Hyperlinks
All About Web Hosting
Hosting Your Own Website What is a Web Host? Your Website's Home Page Building a Website Offline About Free Web Hosting Best Free Web Hosting Commercial Web Hosting How to Get a Domain Name Ecommerce Web Hosting Web Hosting Terminology
Free Web Design Tools
Best Free Website Tools Best Free Text Editors Best Free Graphics Editors Free Website Analysis Tools
Setting Up HTML Kit
HTML Kit Introduction How to install HTML Kit Screenshot Breakdown Basic Configuration Overall Appearance Shortcuts and Startup Editing Window Customizing Toolbars Using the Favorites Tab Making a New Actions Bar Odds and Ends
Free Templates
Free Website Templates Two Column Fixed Width Three Column Liquid Layout Miscellaneous Templates Dynamic Menu Effects Two Column Experimental Terms of Use About These Templates
Website Templates Help
Getting Started Template Zip File Download How to Edit Your Template What to Edit in the HTML How to Add Your Logo Making a Website
Web Design Tips
Web Design Basics Tables vs. Tableless Using Tables for Layout Example Table Layouts World's Crappiest Web Page
Twitter Backgrounds
Twitter Backgrounds Intro Cool Twitter Backgrounds Cool Twitter Backgrounds 2 Plain Twitter Backgrounds Dark Twitter Backgrounds Best Twitter Backgrounds Cute Twitter Backgrounds Music Twitter Backgrounds Music Twitter Backgrounds 2 Twitter Backgrounds 101 TERMS OF USE
All About Web Browsers
What is a Web Browser? Mozilla Firefox Internet Explorer Opera How to Set Up Firefox Top 5 Firefox Extensions
 
Contact
Post Some Feedback Send Me An Email Iron Spider Blog About Iron Spider... Site Conventions
 
 
 

 

Background and Border Color

 
 
<table
border="number in pixels"
bordercolor="color"
bordercolorlight="color"
bordercolordark="color"
bgcolor="color">
...</table>
 
 
Width of table border
Table border color
Top/left side border color
Bottom/right side border color
Background color
 
You are not obliged to settle for the default color used by web browsers to draw the borders of your HTML tables. Using various attributes in the <table> tag, you can specify your table's border color and even create a simple 3D effect. You can also define your table's background color. These attributes are detailed below:


  • border="width in pixels" ~ To recap from the previous page, you can use the border attribute to specify the width of your table's border in pixels. The number of pixels desired for the width is used as the value.
  • bordercolor="color definition*" ~ The bordercolor attribute can be used to define the color of your table's border. You may use any legal color definition as the value. The final effect on your web page will vary from browser to browser. Internet Explorer will use your selected color to display one solid colored frame around your table. Gecko-based browsers, such as Firefox, will create a 3D lighting effect using a light version of your color on the top and left sides and a dark version of your color on the bottom and right sides.
  • bordercolorlight="color definition*" ~ The bordercolorlight attribute can be used to define the border color on the top and left sides of your table. Although any legal color definition can be used as the value, the intent is to allow web authors to specify light colors in order to create a 3D lighting effect on your table's border. (This attribute is not supported in Netscape or Mozilla since the bordercolor attribute already accomodates the resulting effect.)
  • bordercolordark="color definition*" ~ The bordercolordark attribute can be used to define the border color on the bottom and right sides of your table. Although any legal color definition can be used as the value, the intent is to allow web authors to specify dark colors in order to create a 3D lighting effect on your table's border. (This attribute is not supported in Netscape or Mozilla since the bordercolor attribute already accomodates the resulting effect.)
  • bgcolor="color definition*" ~ Using the bgcolor attribute, you can specify the background color of your table which includes the background in between table cells and background inside table cells. You may use any legal color definition as the value.

    A background color may also be applied to an individual table data cell by using the bgcolor attribute in the <td> tag. The selected background color will thus only apply to that particular cell.

    *(Please see Font Color for a description of all legal color definitions.)

Example 1 - SOURCE CODE

<table border="5" bordercolor="maroon" bgcolor="silver">
   <tr><td>Cell content...</td><td>Cell content...</td></tr>
   <tr><td>Cell content...</td><td>Cell content...</td></tr>
   <tr><td>Cell content...</td><td>Cell content...</td></tr>
</table>



Example 1 - RESULT
Cell content...Cell content...
Cell content...Cell content...
Cell content...Cell content...



Example 2 - SOURCE CODE

<table border="5" bordercolor="#8080cc" bordercolorlight="#8080c0" bordercolordark="#400080" bgcolor="#ffffcc">
   <tr><td>Cell content...</td><td>Cell content...</td></tr>
   <tr><td>Cell content...</td><td>Cell content...</td></tr>
   <tr><td>Cell content...</td><td>Cell content...</td></tr>
</table>



Example 2 - RESULT
Cell content...Cell content...
Cell content...Cell content...
Cell content...Cell content...


You don't have to define all four sides of your table's border (also known as the 'frame') nor are you obliged to define all the lines that separate rows and columns (known as 'rules') inside your table. Various attributes can be used to force web browsers to display your table's frame and rules exactly as you please...





Best Free Stuff
for webmasters

Free Text Editors
Free Graphics Editors
Website Analysis Tools
Free Website Templates

See also:

Best Free Web Hosting

 

If you need a .COM web address, you can get one quick and easy at...

www.GoDaddy.com
<~BACK TOP NEXT~>
 
HTML Tutorials |  CSS Tutorials |  Web Hosting |  Domain Names |  Web Design Resources
Iron Spider © Copyright 2004-2011 Robert Darrell