width and height of a cell


<td width="" height="">

Browser
Internet Explorer Firefox Opera
Type
Deprecated

The width and height attributes of the TD (TH) element specifies the width and height of a cell.


<td width="200" height="100">


Attribute Value Explanation
width=" " pixels or % the size of the width
height=" " pixels or % the size of the height

The use of these attributes is deprecated. (Use CSS instead)

Tips and Notes

Use CSS instead of deprecated HTML. Please see the "Related Document" for details on CSS.


Example

Width (Pixels)

<table border="1">
<tr>
<td width="150">150px</td>
<td width="200">200px</td>
<td width="250">250px</td>
</tr>
</table>
Output
150px 200px 250px

Width and Height (Pixels)

<table border="1">
<tr>
<td width="150" height="100">150px * 100px</td>
<td width="200">200px * 100px</td>
<td width="250">250px * 100px</td>
</tr>
</table>
Output
150px * 100px 200px * 100px 250px * 100px

Width and Height (Percentage)

<table border="1" width="100%" height="200">
<tr>
<td width="30%" height="30%">30% * 30%</td>
<td width="70%">70% * 30%</td>
</tr>
<tr>
<td height="70%">30% * 70%</td>
<td>70% * 70%</td>
</tr>
</table>
Output
30% * 30% 70% * 30%
30% * 70% 70% * 70%