Educational Blog: HTML Table

Wednesday, 11 March 2015

HTML Table

<html>
<body>
<center>Employee Data</center>
<table align="center"border=3>
<tr>
<td width="15%">No.</td>
<td width="40%">Name</td>
<td width="25%">Dept.</td>
<td width="20%" align="right">Salary</td>
</tr>
<tr>
<td>001</td>
<td>Name 1</td>
<td>Admin</td>
<td align="right">95,000</td>
</tr>
<tr>
<td>002</td>
<td>Name 2</td>
<td>Admin</td>
<td align="right">75,000</td>
</tr>
<tr>
<td>003</td>
<td>Name 3</td>
<td>HR</td>
<td align="right">50,000</td>
</tr>
<tr>
<td>004</td>
<td>Name 4</td>
<td>Accounts</td>
<td align="right">35,000</td>
</tr>
<tr>
<td>005</td>
<td>Name 5</td>
<td colspan=2 align="center">Retired</td>
</tr>
<tr>
<td>006</td>
<td>Name 6</td>
<td>Public Relations</td>
<td align="right">35,000</td>
</tr>
<tr>
<td colspan=3>Total Sal<br />(In INR)</td>
<td align="right" valign="bottom">290,000</td>
</tr>
</table>
</body>
</html>



From the above code, You will get output as shown below :

Output


img1

No comments:

Post a Comment