Table in HTML

<table> tag is used to defined HTML table. <tr> tag denotes each table row. <th> tag denotes table header. <td> tag denotes table cell.


Example


<html>
<head>
<style>
td, th {
  border: 1px solid blue;
  text-align: left;
  padding: 10px;
}
</style>
</head>
<body>
<h2>Table in HTML</h2>

<table style="width:100%">
  <tr>
    <th>EmployeeName</th>
    <th>Salary</th> 
    <th>Designation</th>
  </tr>
  <tr>
    <td>Amy</td>
    <td>60,000</td>
    <td>Web Developer</td>
  </tr>
  <tr>
    <td>John</td>
    <td>25,000</td>
    <td>App Developer</td>
  </tr>
  <tr>
    <td>Ira</td>
    <td>30,000</td>
    <td>Team Leader</td>
  </tr>
</table>
</body>
</html>


Output

Table in HTML

EmployeeName Salary Designation
Amy 60,000 Web Developer
John 25,000 App Developer
Ira 30,000 Team Leader
Subscribe & Get Regular Updates On Your E-mail