limanza

tag < th > :

Definition and Usage

The <th> tag defines a header cell in an HTML table.

An HTML table has two kinds of cells:

  • Header cells - contains header information (created with the <th> element)
  • Standard cells - contains data (created with the <td> element)

The text in <th> elements are bold and centered by default.

The te

Example
< table width = "400px" border = "1" >
  < tr >
    < th >
      Header 1
    < /th >

    < th >
      Header 2
    < /th >
  < /tr >
  < tr >
    < td >
       1
    < /td >

    < td >
       2
    < /td >

  < /tr >
< /table >
code
Header 1 Header 2
1 2
output

 

Copyright 2014. All rights reserved.