ad

Saturday, November 29, 2025

what is th tag in HTML

what is th tag  in HTML

https://webdesigningtheory.blogspot.com

what is th tag  in HTML

Syntax 

 Syntax of HTML <th> tag


<th>
.
.
</th>

what is th tag  in HTML

Example 

<!DOCTYPE html>
<html>
    <head>
        <title> html th tag </title>
            </head>
            <body>
                <h2>HTML th Tag </h2>
                <table>
                      <tr>
                        <th>HTML</th>
                        <th>PHP</th>
                          </tr>                  
                          <tr>
                            <th>C</th>
                            <th>JavaScript</th>
                          </tr>
                         
                </table>
            </body>
</html>


what is th tag  in HTML

Explain Program

Step  1] 

<!DOCTYPE html>

This declare the document type.

browser that the document is written in html

Step 2 ]

<html>.... . </html>

html is the root element of the html page.

 Every thing inside it is part of the webpage.

Step 3]

<head>.....</head>

head section contain metadata  about the webpage information 

for the browser not display on the webpage.

<title> html th tag </title>

 sets the title of page appears the browser tab

Step 4]

<body>

<h2>HTML th Tag </h2>

 <body> tag contains all the content visible on webpage.

<h2>  create heading , display HTML TH TA G 

Step 5]

 
<table>
                      <tr>
                        <th>HTML</th>
                        <th>PHP</th>
                          </tr>                  
                          <tr>
                            <th>C</th>
                            <th>JavaScript</th>
                          </tr>                        
                </table>


  •   <table> tag  creates table to organize data row and columns.
  • <tr> tag     ->    <tr> tag stands for table row    
  • <th> tag    ->   <th> tag table  header.

                   Two  Row 

  •   First row   HTML & PHP Table
  • Second row  C, Javascript Table
  • default text <th> is bold and centered.

 Step 6]

   Closing tag


 </table> 
</body>
</html>

what is th tag  in HTML

Output