HTML thead tag | Sakala Code
Sakala Code 1 year ago
sakalacode #html

HTML thead tag

HTML <thead> tag is used to group the header content in a table. It is typically used to contain one or more <tr> (table row) elements, each of which contains <th> (table header) elements. The <thead> tag helps in organizing the table structure and making it easier to style or script the header section separately from the body of the table.

HTML <thead> Tag

  1. It helps in separating the table header from the body, making it easier to manage tables.
  2. It enhances accessibility and usability by allowing screen readers and other assistive technologies to identify the header row(s) of a table.
  3. It enables the header rows to fixed and stay visible when scrolling through long tables, especially when used with CSS.

HTML thead tag with Example

<table border="1">
 <thead>
  <tr>
   <th>Name</th>
   <th>Age</th>
   <th>City</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>Alice</td>
   <td>30</td>
   <td>New York</td>
  </tr>
  <tr>
   <td>Bob</td>
   <td>25</td>
   <td>Los Angeles</td>
  </tr>
  <tr>
   <td>Charlie</td>
   <td>35</td>
   <td>Chicago</td>
  </tr>
 </tbody>
</table>
0
390
PHP Variables

PHP Variables

1709870648.png
Sakala Code
1 year ago
HTML samp tag

HTML samp tag

1709870648.png
Sakala Code
1 year ago
Php Oops Constructor

Php Oops Constructor

1709870648.png
Sakala Code
1 year ago
Php Continue Statement

Php Continue Statement

1709870648.png
Sakala Code
1 year ago
HTML TR Tag

HTML TR Tag

1709870648.png
Sakala Code
1 year ago