TABLE TAG
Code :
<!doctype html>
<html>
<head>
<title>Table Tag</title>
</head>
<body>
<h1>Tables in HTML</h1>
<p>
A table represents information in a tabular way, like a spreadsheet: distributed across a grid of rows and colums. Web-based tables have also become a common way to create document layout and design. But unlike printed tables, HTML tables can contain information that is dynamic, or interactive, such as the results of a database query. A table is dynamically generated using the template and the results of a particular database query. Taken together, these capabilities make tables one of HTML's most useful and sophisticated resources.
</p>
<p><b>Example :</b></p>
<table border="1" cellpadding="10px">
<thead>
<caption>Employee data</caption>
<tr>
<th>Employee ID</th>
<th>Name of Emplyee</th>
<th>Salary</th>
</tr>
</thead>
<tbody>
<tr>
<td>101</td>
<td>Anas</td>
<td>100000</td>
</tr>
<tr>
<td>102</td>
<td>Tim Bernee Lee</td>
<td>50000</td>
</tr>
<tr>
<td>103</td>
<td>Charles Babbage</td>
<td>40000</td>
</tr>
</tbody>
</table>
</body>
</html>
No comments:
Post a Comment