![]() |
VOOZH | about |
The HTML <td> width attribute is used to specify the width of a table data cell.
Syntax:
<td width="pixels | %">Note: The <td> width Attribute is not supported by HTML5.
In the following example, we set the width of the first column in pixels.
In this example, we set the width of the first column as a percentage of the total table width.
The <td> width attribute is deprecated in HTML5 and is no longer recommended for modern web development. Instead of using the width attribute, developers should use CSS to set the width of table cells for better styling, flexibility, and responsiveness.
Here’s an example of how to set the width of a table cell using CSS: