Table heading starts with tag and ends with tags
Answers
Answer:
Generally, we use table tag to insert table in html file. Table header stats with <th> tag and end with </th> tag. After inserting table header we insert table row <tr> tag and <td> for inserting table data and also close this tags after insert data.
For example:
<html>
<Head>
<style>
table, th, td {
border: 1px solid black;
}
table, th, td {
text-align="center";
}
</style>
</Head>
<body>
<h2>Employee Table</h2>
<table width=400px height=200 >
<tr>
<th width=100px>Employee ID</th>
<th width=150px>Employee name</th>
<th width=100px>Age</th>
</tr>
<tr>
<td>E0075</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>E0156</td>
<td>Ali</td>
<td>94</td>
</tr>
<tr>
<td>E0125</td>
<td>Jon</td>
<td>80</td>
</tr>
</table>
</body>
</html>
The <th> element defines a table header.
Explanation:
- The HTML <table> tag is used for defining a table. An HTML table consists of the <table> tag and one or more <tr>, <th>, and <td> elements.
- The < tr > element defines the row of the table, the < th > element defines the header of the table, and the < td > element defines the cell of the table.
- The <th> tag defines the header cells in the table which are displayed as bold, center-aligned text. The <th> tag is a header cell that may appear in the first row of an HTML table.
To know more about tags in HTML
Define container and empty tag in html
https://brainly.in/question/7540330
List any 10 tags of HTML and their ddescription
https://brainly.in/question/12804061