Creating HTML Table Headings

Creating HTML Table Headings:

Creating HTML Table Headings: HTML tables do allow you to create heading both vertical and horizontal. We use <th></th> tag to denote table headings in HTML. Let us create our first HTML table with heading on top row to show the potential of an HTML page:

Step 1:

Create a sample table with two rows.





Step 2: Now begin with creating table headings inside the first row


<th> Pakistan</th>





Step 3: Add some data in the 2nd row of our HTML table.


<td> 1st Position</td>

<td> 2nd  Position</td>

<td> 3rd  Position</td>

<td> 4th  Position</td>


Step 4: Test your code in a web browser for results. The result will show a header containing country names while a second row containing country positions. You may see the below result:

HTML Table heading


Leave a Reply