 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create table border in HTML?
To create table border in HTML, the border attribute was used. But the introduction of HTML5, deprecated the border tag. Create table border using the CSS property border. Set table border as well as border for <th> and <td>.

Example
You can try to run the following code to create a border in the table in HTML. We're using <style> tag here:
<!DOCTYPE html> <html>    <head>       <style>          table, th, td {             border: 1px solid black;          }       </style>    </head>    <body>       <h1>Employee Details</h1>       <table>          <tr>             <th>Name</th>             <td>Amit</td>             <td>Sachin</td>          </tr>          <tr>             <th>Age</th>             <td>27</td>             <td>34</td>          </tr>       </table>    </body> </html>  Output

Advertisements
 