Hosting Solutions
mobile_logo Table of Contents


The <th> table header cell element is used to render a cell in a table row <tr> that can hold influence over other cells in the table. It also visually represents the data with a heading type format automatically(centers and bolds the text by default).

Code Example

<table border="1" style="width:300px;"> <thead> <tr> <th id="hc1">Member</th> <th id="hc2">Country</th> <th id="hc3">Age</th> </tr> </thead> <tbody> <tr> <td headers="hc1">John</td> <td headers="hc2">USA</td> <td headers="hc3">23</td> </tr> <tr> <td headers="hc1">Robert</td> <td headers="hc2">Spain</td> <td headers="hc3">48</td> </tr> </tbody> </table> open in code editor


globals - the global attributes common to all elements possible values: see global attribute list colspan - specify the number of columns the element will span possible values: "integer" rowspan - specify the number of rows the element will span possible values: "integer" headers - specify one or more <th> elements that influence the element possible values: "space separated list of th IDs" scope - specify which cells the header cell will affect possible values: "row", "col", "rowgroup", "colgroup", "auto" abbr - specify an alternate label for the element possible values: "string" sorted - specify the element column sort direction possible values: "", "reversed", "an ordinal integer"

Official Documentation



aabbraddressareaasidearticleaudiobbasebdobdiblockquotebodybrbuttoncanvascaptioncitecodecolcolgroupdatadatalistdddeldetailsdfndialogdivdldtemembedfieldsetfigcaptionfigurefooterformh1 h2 h3 h4 h5 h6headheaderhrhtmliiframeimginputinskbdkeygenlabellegendlilinkmainmapmarkmetameternavnoscriptobjectoloptgroupoptionoutputpparampreprogressqrb rp rt rtc rubyssampscriptsectionselectsmallsourcespanstrongstylesub supsummarytabletbodytdtemplatetextareatfootththeadtimetitletrtrackuulvarvideowbr