Attribute of
<table>
What does <table border=""> do?
Was used to specify whether or not borders should be applied to all table cells. This attribute has been deprecated in favor of CSS.

Code Example

<table border="0">
  <tr><td>First column</td><td>Second column</td><td>Third column</td></tr>
  <tr><td>First column</td><td>Second column</td><td>Third column</td></tr>
  <tr><td>First column</td><td>Second column</td><td>Third column</td></tr>
</table>
First columnSecond columnThird column
First columnSecond columnThird column
First columnSecond columnThird column

Formatting Table Borders

The table border attribute could accept two values: 0 for no borders and 1 to display borders around table cells. Simple as that. However, the attribute has been deprecated in favor of table borders styled with CSS. Here's an example of how borders can be added to a table with CSS.

<style> table.example-table, .example-table td {   border: 1px solid green;   border-collapse: collapse; } </style> <table class="example-table">   <tr><td>First column</td><td>Second column</td><td>Third column</td></tr>   <tr><td>First column</td><td>Second column</td><td>Third column</td></tr>   <tr><td>First column</td><td>Second column</td><td>Third column</td></tr> </table> 

And here's how that simple bit of code is rendered in the browser:

First column Second column Third column
First column Second column Third column
First column Second column Third column