HTML th height property
Examples
Two with predefined height header cell:
<table border="1">
<tr>
<th height="100">Month</th>
<th height="100">Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
<tr>
<th height="100">Month</th>
<th height="100">Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
try it"
Browser Support
All major browsers support height attributes.
Definition and Usage
HTML5 does not support the <th> height property. Use CSS instead.
In HTML 4.01, <th> the height attribute obsolete .
height attribute specifies the height of the header cell.
Typically, if the property is not set height, header cell footprint is that it displays the contents of the space required. height property is used to set up predefined height of the header cell.
Compatibility Notes
In HTML 4.01, <th> the height attribute is deprecated. Use CSS instead.
CSS Syntax: <th style = "height: 100px">
CSS Example: set the height of the header cell
In our CSS tutorial you can find more information about the height property detail.
grammar
<th height="pixels|%">
Property Value
值 | 描述 |
---|---|
pixels | 设置以像素计的高度值(比如 height="50")。 |
% | 设置以包含元素百分比计的高度值(比如 height="50%")。 |
HTML <th> tag