Continue
Table Heading
Table heading can be defined using <th> tag. This tag will be put to replace <td> tag. which is used to represent actual data cell. Normally you will put your top row as table heading as shown below, otherwise you can use <th> element in any row.
Example
<!DOCTYPE html>
<html>
<head>
<title>HTML Table Header</title>
</head>
<body>
<table border="1">
<tr>
<th>Name</th>
<th>Salary</th>
</tr>
<tr>
<td>ab</td>
<td>500</td>
</tr>
<tr>
<td>cd</td>
<td>7000</td>
</tr>
</table>
</body>
</html>
This will produce the following result:
Name Salary
ab 5000
cd 7000
Comments
Post a Comment