Creating a table in html
To create a table in html, first of all we just create a basic template of html page, Which can be written as
<table>
<thead>
<tr>
<td>Sr. No.</td>
<td>Employee Name</td>
<td>Department</td>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Suraj </td>
<td>dot net developer</td>
</tr>
<tr>
<td>1</td>
<td>Jon</td>
<td>Manager</td>
</tr>
</tbody>
</table>
Output:
Sr. No. | Employee Name | Department |
1 | Suraj | dot net developer |
2 | Jon | Manager |
for creating border in table
you can use CSS or bootstrap here I have used inline CSS
style="border: 1px solid black;". this code of line is used in table tag as
<table style="border: 1px solid black;">
Sr. No. | Employee Name | Department |
1 | Suraj | dot net developer |
2 | Jon | Manager |
No comments:
Post a Comment