<th>
TablesDefines a header cell in a table. Rendered bold and centered by default. Provides context for associated data cells.
Common Attributes
colspanrowspanscopeheadersExample
<th scope="col">Name</th>
About the <th> Element
The <th> HTML element belongs to the Tables category of HTML elements. Defines a header cell in a table. Rendered bold and centered by default. Provides context for associated data cells. Understanding when and how to use this element is essential for building well-structured, accessible, and SEO-friendly web pages.
The <th> element requires both an opening <th> and closing </th> tag. Content placed between these tags becomes the element's children. This element is part of the current HTML Living Standard and is supported in all modern browsers including Chrome, Firefox, Safari, and Edge.
Proper use of semantic HTML elements like <th> improves document structure, helps screen readers interpret content correctly, and provides signals to search engines about the purpose of different sections of your page. This leads to better accessibility scores, improved SEO rankings, and more maintainable code.