A visible grid doesn’t appear
table cells by default, which has the
potential to make the table quite difficult to read and understand (and
bear in mind that this is a very simple example). In order to create
structure and order around the data that’s presented, use the
border attribute. It applies a border to each cell,
and to the table as a whole.
If we change the value of the
border attribute, from
"5" for example, the size of the border around the
table will change, but the border inside the table—between the table
cells—won’t change size, as Figure 1
table is set to
<table border="1"> <tr> <th>Account Type</th> <th>Interest Rate</th> </tr> <tr> <td>Smart</td> <td>From 2%</td> </tr> <tr> <td>Young Saver</td> <td>From 1.6%</td> </tr> </table>
This attribute takes a numerical value, which reflects a pixel measurement.
border attribute isn’t deprecated—it can be used in
a perfectly valid web page. However, although it enjoys full support, it’s
preferable not to specify a
border. Instead, use
CSS to apply the border style and color.
There are no comments yet.