Write HTML code for the following table -
Answers
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
tr:nth-child(even) {
background-color: #dddddd;
}
</style>
</head>
<body>
<h2>Employee</h2>
<table>
<tr>
<th>Empno</th>
<th>Emname</th>
<th>Designation</th>
<th>Salary</th>
<th>Date of Appointment</th>
</tr>
<tr>
<td>E101</td>
<td>Anita Deka</td>
<td>Manager</td>
<td>55000.00</td>
<td>20-05-2012</td>
</tr>
<tr>
<td>E102</td>
<td>Bimal Paul</td>
<td>Clerk</td>
<td>35000.00</td>
<td>15-08-2015</td>
</tr>
<tr>
<td>E103</td>
<td>Dhiren Kalita</td>
<td>President</td>
<td>58000.00</td>
<td>19-10-2016</td>
</tr>
</table>
</body>
</html>
Hope this helps.