Home Tutorial Html Html5 HTML 5 thead Tag, Example of <thead> tag in html5

 
 

HTML 5 thead Tag, Example of <thead> tag in html5
Posted on: September 15, 2010 at 12:00 AM
Advertisement
In this discussion, We will introduce about the use of <thead> tag in html5. This tag is used to specify the group of header of the table body.

HTML 5 <thead> Tag, Example of <thead> tag in html5

In this discussion, We will introduce about the use of <thead> tag in html5. This tag is used to specify the group of header of the table body. In the table we must have zero or more <tr> tag inside the <thead> tag. The <thead> tag is used in conjunction with <tbody>, <tfoot> in the <table> tag. The <thead> tag must have one or more <th> tag within <tr> tag which is nested in <thead>. The <thead> tag is the child of <table> tag and used after the <caption>, <colgroup> tag. This tag must have opening and closing tags.

Declaration Syntax:

the syntax of the <thead> tag is as:

<thead>One or more tr, th tag</thead>

This tag don't have any specific attribute.

Example: thead_tag.html.

<!DOCTYPE html>
<html>
<head>
<title>Example of thead tag</title>
</head>
  <body>
    <table border="1">
                <thead>
                    <tr>
                       <th>NAME</th>
                       <th>Sr. name</th>
                   </tr>
             </thead>
                   <tr>
                     <td> Gyan</td>
                     <td>  Singh</td>
                  </tr>
                  <tr>
                     <td> Ankit</td>
                     <td> Kumar</td>
                </tr>
     </table>
  </body> 
</html>

Output:

Download This Example:

Difference between html4.01 and html5.

None

Advertisement

Related Tags for HTML 5 thead Tag, Example of <thead> tag in html5:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 15, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com