![]() |
VOOZH | about |
The width attribute in the <th> tag is used to specify the width of a header cell. It was commonly used in older HTML but is now deprecated in HTML5.
Note: The width attribute is deprecated in HTML5; use CSS (width) instead.
<th width="pixels | %">Example: In this example, the <th> width attribute sets column widths to 50%, 20%, and 30% of the table.
Example: In this example, the <th> width attribute sets 100px for “Header 1,” 200px for “Header 2,” and the remaining space for “Header 3.”