The width attribute of the TABLE element specifies the width of a table.
<table width="300">
| Attribute | Value | Explanation |
|---|---|---|
| width=" " | pixels or % | the size of the width |
This can be specified with CSS. Please see the "Related Document" for details on CSS.
The width is not specified
<table border="1">
<tr>
<td>Cell A</td>
<td>Cell B</td>
<td>Cell C</td>
</tr>
</table>
| Cell A | Cell B | Cell C |
The width is 80%
<table border="1" width="80%">
<tr>
<td>Cell A</td>
<td>Cell B</td>
<td>Cell C</td>
</tr>
</table>
| Cell A | Cell B | Cell C |
The width is 500 pixels
and the height is 100 pixels (The height attribute for the TABLE element is non standard.)
<table border="1" width="500" height="100">
<tr>
<td>Cell A</td>
<td>Cell B</td>
<td>Cell C</td>
</tr>
</table>
| Cell A | Cell B | Cell C |