HTML Table frame attribute

Example

The following example specifies that only the borders around the table should be visible:
<table frame="box">
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
</table>


Definition and Usage

The frame attribute specifies which parts of the outside table borders that should be visible.
For practical reasons, it may be better not to specify frames, and use CSS to apply border styles instead.

Browser Support

The frame attribute is supported in all major browsers, except Internet Explorer.
Note: Internet Explorer displays this attribute incorrectly. IE displays the borders on the cells within the table too (instead of on only the outside borders).
Note: Not supported in Safari 2.0 or earlier versions.

Syntax

<table frame="value">

Attribute Values

Value Description
void The outside borders are not shown
above The top outside border is shown
below The bottom outside border is shown
hsides The top and bottom outside borders are shown
vsides The left and right outside borders are shown
lhs The left outside border is shown
rhs The right outside border is shown
box The outside borders are shown on all four sides
border The outside borders are shown on all four sides
Share this article :
 
Copyright © 2012. Best Online Tutorials | Source codes | Programming Languages - All Rights Reserved