HTML/Table Tags/width And Height Of A Cell - TAG Index

Browser
  • IE
  • Cr
  • Sf
  • Fx
  • O
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"></td>
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)

  • Deprecated elements and attributes

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%
All HTML elements as defined in the HTML Living Standard

Categories

  • HTML Tags
  • Page Tags
  • Text Tags
  • Link Tags
  • List Tags
  • Image Tags
  • Table Tags
  • Frame Tags
  • Form Tags
  • Embed Tags
  • Attributes
  • All HTML Tags
  • Relation Document

Từ khóa » Html Td Width Html5