1) Why use the th element instead of td element?

Semantics, it won't make any difference to you whether you use td instead of th, well, it will get your work done happily, but, to differentiate them, we use th, thead, tfoot etc, it's like we can use div for wrapping text, but using p will make more sense yea?

Also, search engines understand, that what does your document contain, say, you use em so whatever you style your em text as, search engines will get a clue that hey, the word in the em is emphasized, so it is important one in the document, could be a keyword perhaps.

It's like you are saying a doctor, that my body is paining, but if you describe which part of your body pains, will make easy for the doctor to judge and fix the issue easily.

Thus, with the same logic, if you define the headers of the table using th would rather make more sense instead of using td, will help search engines to know your content in a better way, screen readers to read out the data differently, browsers to display it more appropriately.


2) It then goes on to say that some browsers will render the th element differently

Yes, browsers render text of the th element in bold


3) the article then advises not to style the TH ourselves

Well, I won't agree with this at all, you can style the th elements


4) I find no mention that the th element is depreciated nor can I see any value in it.

No, they aren't obsolete/deprecated [1]

[1]. Though, some of the attributes are deprecated for the element, click here for more information.

Answer from Mr. Alien on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › th
<th> HTML table header element - MDN Web Docs
5 days ago - The <th> HTML element defines a cell as the header of a group of table cells and may be used as a child of the <tr> element.
🌐
W3Schools
w3schools.com › TAGS › tag_th.asp
HTML th tag
The <th> tag defines a header cell in an HTML table.
People also ask

What is HTML tag?
The HTML tag stands for a table header cell in an HTML table. It is used to define headings for columns or rows within the table. elements are typically bold and centered by default, providing semantic meaning to data and aiding accessibility for screen readers and other assistive technologies.
🌐
lenovo.com
lenovo.com › home
The Role of HTML `<th>` Tag in Tables | Lenovo US
How do I use both colspan and rowspan attributes together in an HTML table?
To use both colspan and rowspan attributes in an HTML table, specify them within the or tags. For example, would create a cell spanning two columns and three rows. Ensure that the total number of columns and rows affected by these attributes doesn't exceed the table's dimensions to avoid layout issues.
🌐
lenovo.com
lenovo.com › home
The Role of HTML `<th>` Tag in Tables | Lenovo US
When might I need to use both colspan and rowspan attributes together with the tag?
You might need to use both colspan and rowspan attributes together with the tag when you have a complex table structure where a header cell needs to span across multiple columns and rows simultaneously. This is particularly useful when creating tables with merged cells that cover a specific range of data, providing a clear and organized layout for your table content.
🌐
lenovo.com
lenovo.com › home
The Role of HTML `<th>` Tag in Tables | Lenovo US
Top answer
1 of 3
23

1) Why use the th element instead of td element?

Semantics, it won't make any difference to you whether you use td instead of th, well, it will get your work done happily, but, to differentiate them, we use th, thead, tfoot etc, it's like we can use div for wrapping text, but using p will make more sense yea?

Also, search engines understand, that what does your document contain, say, you use em so whatever you style your em text as, search engines will get a clue that hey, the word in the em is emphasized, so it is important one in the document, could be a keyword perhaps.

It's like you are saying a doctor, that my body is paining, but if you describe which part of your body pains, will make easy for the doctor to judge and fix the issue easily.

Thus, with the same logic, if you define the headers of the table using th would rather make more sense instead of using td, will help search engines to know your content in a better way, screen readers to read out the data differently, browsers to display it more appropriately.


2) It then goes on to say that some browsers will render the th element differently

Yes, browsers render text of the th element in bold


3) the article then advises not to style the TH ourselves

Well, I won't agree with this at all, you can style the th elements


4) I find no mention that the th element is depreciated nor can I see any value in it.

No, they aren't obsolete/deprecated [1]

[1]. Though, some of the attributes are deprecated for the element, click here for more information.

2 of 3
5

You have partly misunderstood the document cited. In particular, it does not say that you should not style th; rather, that you should not use th for just “styling”, i.e. use it for something that is not a table header, just to make it appear bold and centered. (This warning isn’t particularly relevant; I haven’t ever seen people do such things.)

By definition, th contains header information for cells. This is rather vague, but in many simple case, it is rather obvious and simple – typically so that the first row of a table contains headers for the columns, like names of quantities.

The practical impact is that special browsers and assistive software may be able to present a table to the user in a much better way, if they know the association between data cells and header cells. For example, when a particular cell is being investigated by the user, they can, instead of just its content like “32 °C”, also indicate the names of the relevant headers, like “Max. temperature” from a column header cell and “Kairo” from a row header cell.

Browsers render th element contents in bold face and as horizontally centered by default; this practice is being standardized in HTML5. But this is just to be taken into account; you can override it in CSS if desired. Especially bolding is mostly useful for header cells, making it easier to notice them and recognize them as headers.

There are different minor differences as well, like different sets of allowed attributes (in HTML5).

🌐
Lenovo
lenovo.com › home
The Role of HTML `<th>` Tag in Tables | Lenovo US
The purpose of using the <th> tag in HTML is to define table header cells. By using <th>, you show to browsers and assistive technologies that the content within those cells is a header, providing semantic meaning to the structure of your table.
🌐
GeeksforGeeks
geeksforgeeks.org › html › html-th-tag
HTML Table Header Tag - GeeksforGeeks
1 month ago - The <th> tag in HTML is used to define table header cells, helping label and organize table columns or rows.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Element › th
<th>: The Table Header element - HTML - MDN Web Docs
The <th> HTML element defines a cell as the header of a group of table cells and may be used as a child of the <tr> element.
Find elsewhere
🌐
W3C
w3.org › MarkUp › html3 › tablecells.html
Table Cells (TH and TD)
The TH and TD elements are used for table cells. TH is used for table header cells while TD is used for table data cells. This distinction gives user agents a means to render such cells distinctly, for instance by using a larger or heavier font for header cells.
🌐
Computer Hope
computerhope.com › jargon › h › html-th-tag.htm
HTML <th> Tag
The HTML (HyperText Markup Language) <th> tag is short for table head and used to designate a cell as a column header in a table. It is useful for storing information about a set of rows or columns.
🌐
DotFactory
dofactory.com › html › th › style
HTML th style
In HTML, the style attribute on a th element assigns a unique style to that element.
🌐
TechOnTheNet
techonthenet.com › html › elements › th_tag.php
HTML: <th> tag
The HTML <th> tag defines a header cell that can appear in the first row of an HTML table. Browsers traditionally render the text found within the <th> tag as bold, center-aligned text.
🌐
Tutorialspoint
tutorialspoint.com › html › html_th_tag.htm
HTML - <th> Tag
Let's look at the following example, where we are going to consider the basic usage of the <th> tag. <!DOCTYPE html> <html> <style> table, th, td { border: 2px solid #D2B4DE; } </style> <body> <table> <tr> <th>Name</th> <th>Age</th> </tr> <tr> <td>Maya</td> <td>23</td> </tr> <tr> <td>Ravi</td> <td>22</td> </tr> <tr> <td>Ram</td> <td>21</td> </tr> </table> </body> </html>
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › thead
<thead> HTML table head element - MDN Web Docs
5 days ago - The <thead> HTML element encapsulates a set of table rows (<tr> elements), indicating that they comprise the head of a table with information about the table's columns.
🌐
HTML.com
html.com › tags › th
<th> HTML Tag »
July 3, 2017 - In most cases, you will want the first row of the table to be displayed as headings or labels for each table column. The correct way to do this is to use <th> elements rather than <td> elements for the content in the first row of the table. By default, browsers will center the contents of <th> elements and display them in a bold typeface.
🌐
Educative
educative.io › answers › what-is-the-th-element-in-html
What is the <th> element in HTML?
The <th> tag stands for table heading. It is used to define a single data cell in the HTML table.
🌐
GeeksforGeeks
geeksforgeeks.org › html › differentiate-between-th-thead-tags-in-html-table
Differentiate between &lt;th&gt; &amp; &lt;thead&gt; tags in HTML Table - GeeksforGeeks
July 23, 2025 - HTML <th> tag: This tag defines the heading for a table cell. The header of the cell in a table is always aligned centered by default and is bold so that anyone can easily find the header of a column.
🌐
W3Schools
w3schools.com › tags › att_th_colspan.asp
HTML th colspan Attribute
The colspan attribute defines the number of columns a header cell should span.
🌐
W3Schools
w3schools.com › html › html_tables.asp
HTML Tables
By default, the text in <th> elements are bold and centered, but you can change that with CSS. For a complete list of all available HTML tags, visit our HTML Tag Reference.