How do you create a header for a < table > in HTML?

 How do you create a header for a table in HTML?


For creating table header in HTML

use the <th>…</th> tag.


t stand for table 

h stand for header

Header for a table in HTML we use <th>...</th>


 A table header tag is surrounded by the table row <tr>…</tr>.

      r stand for row 

<tr>

            <th>Learning</th>

            <th>HTML</th>
       
  </tr>


 The <tr> tag is surrounded by the <table> tag. A table consist of a rows and columns, which can be set using one or more <tr>, <th>, and <td> elements

Comments

Last 7 Days

How to use referrerpolicy Attribute value ( no-referrer-when-downgrade ) with < iframe > tag in HTML ? with example

Syntax of writing a different font style in HTML

How to use sandbox attribute value ( allow-top-navigation) with < iframe > tag in HTML ? with example

What is < table > tag in HTML?

How to use the datalist tag in HTML?

css for code blocks