<thead> : Table Head element

Introduction

The <thead> element in HTML represents the group of rows in a table that contain the headings of the columns. It’s typically used to structure the top part of a table where column labels or headers are placed. This element is often paired with <th> (table header cell) elements to define those headings.

Here’s a basic example of how you might use <thead> in conjunction with <th>:

Output :

In this example, we will show heading section different by the others by applying background colour on <thead> , and the <thead> element contains one <tr> (table row) element with three <th> elements representing the headings for three columns. The actual data is typically placed within the <tbody> (table body) element, but the <thead> helps structure the table and improve accessibility by associating column headers with their respective data.

Leave a Comment