ad

Thursday, December 4, 2025

what is the use of thead tag in html

what is the use of thead tag in html

web designing theory

what is the use of thead tag in html

Example



<!doctype html>
  <html>
  <head>
     
     <title> HTML Input Type Datetime </title>

      </head>
    <body>
        <center>
    <h1> webdesigningtheory.blogspot.com</h1>
 
    <h2> learn HTML thead tag</h2>
    <table>

        <!-- thead tag starts -->
         <thead>
             <tr>
            <th>Student Name</th>
            <th> Roll No </th>
             </tr>
         </thead>
         <!-- thead tag ends -->
          <tbody>
            <tr>
                <td>Seeta</td>
                <td> 01</td>
            </tr>
            <tr>
                <td>radha</td>
                <td>02</td>
            </tr>
            <tr>
                <td>parvati</td>
                <td>03</td>
            </tr>
            <tr>
                <td>sarasvati</td>
                <td>04</td>
            </tr>
            <tr>
                <td>tulja</td>
                <td>05</td>
            </tr>
          </tbody>
     </table>
     </center>
    </body>
    </html>


what is the use of thead tag in html

Explain Program

Step  1] 

<!DOCTYPE html>

This declare the document type.

browser that the document is written in html

Step 2 ]

<html>.... . </html>

html is the root element of the html page.

 Every thing inside it is part of the webpage.

Step 3]

<head>
     
  <title> HTML Input Type Datetime </title>

    </head>

  <head>  section 

  head section contains metadata about page. not visible on the page itself.

 <title> tag

 title section set the title of the page shows the browser tab.

Step 4]

<body><center>

< body> tag  contains all the content visible to webpage.

<body> tag contains  all the visible content of the page.

inside <body> show the browser screen.

<center>  all the content center

Step 5]


<h1> webdesigningtheory.blogspot.com</h1>
 
    <h2> learn HTML thead tag</h2>

<h1> tag heading of page.

<h2> tag subheading  of page.

Step 6]

  <table>

<table> tag  creates structured data in row and columns.

Step 7]

<thead>
             <tr>
            <th>Student Name</th>
            <th> Roll No </th>
             </tr>
         </thead>

  <thead> tag  :- defines the header section  of the table.

  <tr> tag  :-  Row the table.

  <th> tag :- header cells.

   Student Name and Roll No  show column headers.

Step 8]


</thead>
         <!-- thead tag ends -->
          <tbody>
            <tr>
                <td>Seeta</td>
                <td> 01</td>
            </tr>
            <tr>
                <td>radha</td>
                <td>02</td>
            </tr>
            <tr>
                <td>parvati</td>
                <td>03</td>
            </tr>
            <tr>
                <td>sarasvati</td>
                <td>04</td>
            </tr>
            <tr>
                <td>tulja</td>
                <td>05</td>
            </tr>
          </tbody>


<tbody> tag :- contains the main data of table.

<tr> tag :-  row of student data.

<td> tag :- table cell containing student name or roll number.

Step 9]

   Closing tag  

   
     </table>
     </center>
    </body>
    </html>


what is the use of thead tag in html

Output

what is the use of thead tag in html







Related Post :-

how to use the address tag in html

how to abbr tag in HTML

how to use anchor tag in html