Latest

recent

HTML Table border attribute

Example

The following example sets the width of the borders around a table to five pixels:
<table border="5">
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
</table>


Definition and Usage

The border attribute specifies the width of the borders around a table.
The border attribute applies a border to each cell, and around the table. If the value of the border attribute is changed, only the size of the border around the table will change. The border inside the table will be 1 pixel.
Tip: Set border="0" to display tables with no borders.
For practical reasons, it may be better not to specify borders, and use CSS to apply border styles and color instead.

Browser Support

The border attribute is supported in all major browsers.

Syntax

<table border="value">

Attribute Values

Value Description
pixels Specifies the border width
HTML Table border attribute Reviewed by 1000sourcecodes on 02:33 Rating: 5
Powered by Blogger.