What is HTML Table Heading?
HTML table heading is used to create a heading in a table. Table heading can be placed using <th> tag. The <th> tag will be put to replace <td> tag as shown below:
Example
<!DOCTYPE html>
<html>
<head>
<title>Scholars Table Header</title>
</head>
<body>
<table border="1">
<tr>
<th>Name</th>
<th>Marks</th>
</tr>
<tr>
<td>David Charles</td>
<td>78</td>
</tr>
<tr>
<td>Josh Drake</td>
<td>82</td>
</tr>
</table>
</body>
</html>
See Result:
Name
|
Marks
|
David Charles
|
78
|
Josh Drake
|
82
|
No comments:
Post a comment