<thead> HTML Tag

In this article we will discuss about how to use the thead Tag in HTML.
  • 1436

The HTML <thead> tag is used for adding a header to a table. The thead element defines a group of header rows in a table.

HTML Code:

<html>

<head>

    <title>This is my first web page</title>

</head>

<body>

    <table border="1">

        <thead>

            <tr>

                <th colspan="2">

                    Table header in html

                </th>

            </tr>

        </thead>

        <tbody>

            <tr>

                <td>

                    Ram

                </td>

                <td>

                    Sita

                </td>

            </tr>

            <tr>

                <td>

                    Mohan

                </td>

                <td>

                    radha

                </td>

            </tr>

            <tr>

                <td>

                    shiv

                </td>

                <td>

                    parwati

                </td>

            </tr>

        </tbody>

    </table>

</body>

</html>

 

Output:

tableoutput.jpg 

Ask Your Question 

Got a programming related question? You may want to post your question here
 
Programming Answers here

 

© 2020 DotNetHeaven. All rights reserved.