HTML TUTORIALS-
HTML Table Headers Tag –
Introduction-
HTML Table Headers Tutorial: <th> Tag Usage, Syntax & Best Practices
HTML, table headers are defined using the <th> (table header) element, and they are typically placed inside a <thead> section of a table. Headers usually appear bold and centered by default:-
📋 1. Syntax of Table Headers-👇
<table border="1">
<thead>
<tr>
<th>Product</th>
<th>Price</th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
<tr>
<td>Laptop</td>
<td>$1000</td>
<td>2</td>
</tr>
<tr>
<td>Phone</td>
<td>$500</td>
<td>5</td>
</tr>
</tbody>
</table>
| Product | Price | Quantity |
|---|---|---|
| Laptop | $1000 | 2 |
| Phone | $500 | 5 |
<table border="1">
<tr>
<th></th>
<th>Math</th>
<th>Science</th>
<th>English</th>
</tr>
<tr>
<th>Pooja</th>
<td>85</td>
<td>90</td>
<td>80</td>
</tr>
<tr>
<th>Ovi</th>
<td>92</td>
<td>88</td>
<td>95</td>
</tr>
</table>
| Math | Science | English | |
|---|---|---|---|
| Pooja | 85 | 90 | 80 |
| Ovi | 92 | 88 | 95 |
<table style="width:100%">
<caption>Monthly savings in Payment</caption>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>March</td>
<td>$50</td>
</tr>
<tr>
<td>May</td>
<td>$30</td>
</tr>
</table>
| Month | Savings |
|---|---|
| March | $50 |
| May | $30 |
| Tag | Purpose |
|---|---|
| <table> | Defines the table |
| <tr> | Table row |
| <th> | Table header (bold + centered by default) |
| <td> | Table data (cell content) |
| <caption> | Defines a table caption |
| <colgroup> | Specifies a group of one or more columns in a table for formatting |
| <col> | Specifies column properties for each column within a (colgroup) element |
| <thead> | Groups the header content in a table |
| <tbody> | Groups the body content in a table |
-How To Import Data(LSMW) LEGACY SYSTEM MIGRATION WORKBENCH