Web4College

HTML border attribute

HTML border attributes represents the border of the table to make it presentable.

Example
Try it
<table border="1">
  <tr> <th>Name</th> <th>Roll no</th> </tr>
  <tr> <td>Albert</td> <td>50</td> </tr>	
  <tr> <td>Merie</td> <td>55</td> </tr>	
  <tr> <td>Abraham</td> <td>56</td> </tr>	
 </table>
NameRoll no
Albert50
Merie55
Abraham56

Attribute values

All possible values of border attribute

The value of this attribute is a valid positive integer (1,2,3...). For example, the following example represents a thick border for the table.

Preview Example
Try it

In the above example, the value of border attribute is 5.

Related Tags

The tags that support border attribute

<table> tag

table tag represents the data in the form of rows and columns. It supports the border attribute.

Although border attribute is used in the <border> tag but border also applies to the <td> tag.