Home
HTML
HTML Table Border
Example 3: HTML Table Border
Run ❯❯
<!DOCTYPE html> <html> <head> <title>Table Border Color Example</title> <style> table, td, th { border: 5px solid; border-collapse:collapse; border-color:teal; } </style> <head> </head> <body> <h1>Table Border Color Example</h1> <table> <tr> <th>No</th> <th>Name</th> <th>Run</th> <th>Team</th> </tr> <tr> <td>1</td> <td>Sachin Ramesh Tendulkar</td> <td>18426</td> <td>India</td> </tr> <tr> <td>2</td> <td>Kumar Chokshanada Sangakkara</td> <td>14234</td> <td>Sri Lanka</td> </tr> <tr> <td>3</td> <td>Ricky Thomas Ponting</td> <td>13704</td> <td>Australia</td> </tr> <tr> <td>4</td> <td>Sanath Teran Jayasuriya</td> <td>13430</td> <td>Sri Lanka</td> </tr> <tr> <td>5</td> <td>Denagamage Proboth Mahela de Silva Jayawardene</td> <td>12650</td> <td>Sri Lanka</td> </tr> </table> <p>The value of the CSS border-color property is set to teal. Change it to some other colors and see the result. You can write color by name, RGB, HEX and HSL value.</p> </body> </html>