Skip to content
Related Articles

Related Articles

Improve Article

How to group header content of a table using HTML5 ?

  • Last Updated : 05 Jun, 2020

In this article, we define to group the header content in a table by using the <th> tag in HTML to set the header cell of a table. Two types of cells in an HTML table.

  • Header Cell: It is used to hold the header information.
  • Standard Cell: It is used to hold the body of data.

The working of both tags (<th> and <td>) are same but the text properties are different. In <th> tag, text is bold and centered, and in <td> tag, text is regular and left align by default.

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.


<th> Contents... </th>


<!DOCTYPE html>
        Group the header content 
        in a table using HTML
        body {
            text-align: center;
        h1 {
            color: green;
        th {
            color: blue;
        td {
            border: 1px solid black;
            border-collapse: collapse;
            HTML5: How to group the 
            header content in a table?
                    <th>User Id</th>


Supported Browsers are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

My Personal Notes arrow_drop_up
Recommended Articles
Page :