Add Borders to the table

The table element has the border attribute. The value assigned to the border attribute must be 1 or the empty string (""). This attribute doesn't control the style of the border.

 
<!DOCTYPE HTML> 
<html> 
<head> 
<title>Example</title> 
</head> 
<body> 
    <table border="1"> 
            <tr> 
                <td>A</td> 
                <td>B</td> 
                <td>C</td> 
            </tr> 
            <tr> 
                <td>D</td> 
                <td>E</td> 
                <td>F</td> 
            </tr> 
    </table> 
</body> 
</html>
  
Click to view this demo.
Home 
  HTML CSS Book 
    HTML  

table tr td:
  1. <table>,<tr>,<td> creates a simple table
  2. Adding a Caption to a Table
  3. Add Borders to the table
Related: