Learn HTML Code Tutorial Reference Guide

Table Borders: BORDER, FRAME and RULES

For the next few pages we're going to use three <TABLE ...> attributes:

BORDER size of outside border
FRAME which outside borders are displayed
RULES which inside borders are displayed

These three attributes can get pretty confusing because they tend to change each other's defaults. For example, if you don't use BORDER then the default for RULES is NONE. However, if you do use BORDER (but only values greater than zero) or if you use any value of FRAME besides VOID then RULES defaults to ALL. Likewise, RULES changes FRAME's defaults.

To keep things simple it's usually a good idea to follow a simple rule: if you use either FRAME or RULES use them both and also use BORDER. That avoids confusion about what is defaulting to what. We'll follow that example in this guide. So, for example, to create a table with no inner borders we'll use all three attributes like this:

<TABLE BORDER=1 RULES=NONE FRAME=BOX>

which gives us this table

watermelon grapes
peaches bananas




 

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   Privacy Policy   |   About
Copyright ©1997-2002 Idocs and ©2002-2014 HTML Code Tutorial