HTML

Test for table tags compliance with HTML 4.01 specification

Topic status automatically displays here - do not remove.

Bookmark me!Bookmark this topic  Print me!Print this topic

3x3 Table without any formatting:

<TABLE>
    <TR>
        <TD>1</TD>
        <TD>2</TD>
        <TD>3</TD>
    </TR>
    <TR>
        <TD>4</TD>
        <TD>5</TD>
        <TD>6</TD>
    </TR>
    <TR>
        <TD>7</TD>
        <TD>8</TD>
        <TD>9</TD>
    </TR>
</TABLE>

Which displays like this:

1 2 3
4 5 6
7 8 9

By default, no borders should display, and the table size should be determined by the sum of the cell contents. 

However, if we add the border attribute to the TABLE tag, we also imply that FRAME="border" and RULES="all":

<TABLE BORDER="1"> ... </TABLE>

Which displays like this:

1 2 3
4 5 6
7 8 9

If we further declare the FRAMES and RULES attributes of the TABLE tag, we can customize the display. 
Valid values for the FRAMES attribute are: void | above | below| hsides | vsides | lhs | rhs | box | border.
Valid values for the RULES attribute are: none | groups | rows | cols | all.

<TABLE BORDER="1" FRAMES="above"
   RULES="cols"> ... </TABLE>
RULES none
FRAMES
void
1 2 3
4 5 6
7 8 9

FRAMES="none"

FRAMES="above"

1 2 3
4 5 6
7 8 9

FRAMES="below"

1 2 3
4 5 6
7 8 9

FRAMES="hsides"

1 2 3
4 5 6
7 8 9

FRAMES="vsides"

1 2 3
4 5 6
7 8 9

FRAMES="lhs"

1 2 3
4 5 6
7 8 9

FRAMES="rhs"

1 2 3
4 5 6
7 8 9

FRAMES="box"

1 2 3
4 5 6
7 8 9

FRAMES="border"

1 2 3
4 5 6
7 8 9

RULES="none"

1 2 3
4 5 6
7 8 9

RULES="groups"

1 2 3
4 5 6
7 8 9

RULES="rows"

1 2 3
4 5 6
7 8 9

RULES="cols"

1 2 3
4 5 6
7 8 9

RULES="all"

1 2 3
4 5 6
7 8 9

 

Back to Top

See Also

xyz Lotech Solutions' Tips, Tricks, and Procedures

Back to Top