Table Header Cell XHTML tag


Table Header Cell Transitional   Strict
th tags example tags example
Must be contained in <table>   As Transitional  
Must contain in opening tag   ----------------------   ----------------------
Must not contain in opening tag name=""
<table >
<tr>
<th name="bluecell" >&nbsp;</th>
<th >&nbsp;</th>
</tr>
</table>
As Transitional  
Can contain in opening tag align="" 
[Horizontal align]

align="left"
align="right"
align="center"
align="justify"

__________________
valign=""
[Vertical align]

valign="top"
valign="middle"
valign="baseline"
valign="bottom"

baseline = aligns the cells along the baselines of the text. example

__________________
id=""





__________________
CELL WIDTH - percentage [%]

width="%"






__________________
CELL WIDTH - pixels

width=""

Note: 
you do Not add "px" 
after the amount

e.g [width="500px"]

 
align="left"

<table >
<tr>
<th  align="left">text</th>
<th>&nbsp;</th>
</tr>
</table>
__________________
valign="top"

table >
<tr>
<th valign="top" >text</th>
<th>&nbsp;</th>
</tr>
</table>



_______________
<table >
<tr>
<th id="bluecell" >&nbsp;</th>
<th >&nbsp;</th>
</tr>
</table>
__________________
CELL WIDTH - percentage [%]

<table width="100%">
<tr>
<th width="50%">&nbsp;</th>
<th width="50%">&nbsp;</th>
</tr>
</table>

__________________
CELL WIDTH - pixels

<table width="200">
<tr>
<th width="50">&nbsp;</th>
<th width="50">&nbsp;</th>
</tr>
</table>
As Transitional







______________
As Transitional










______________
As Transitional





______________
Cell width will
Fail Strict Validation

width="%"






______________
Cell width will
Fail Strict Validation






























______________



<table width="100%">
<tr>
<th width="50%">&nbsp;</th>
<th width="50%">&nbsp;</th>
</tr>
</table>

______________


<table width="200">
<tr>
<th width="50">&nbsp;</th>
<th width="50">&nbsp;</th>
</tr>
</table>
Must contain between tags Text 
or non-breaking space
<th>Text</th>
<th> &nbsp;</th>
  As Transitional
Can contain between tags        
Must not contain between tags        
Must not be contained in        
Can be contained in        
th is used to define a header row within a table. The <th> element is identical to the <td> element except that the text within the <th> element is usually rendered with a bold font and centered within the cell.