<table width="">
Browser |
|
---|---|
Type |
The width attribute of the TABLE element specifies the width of a table.
<table width="300"></table>
Attribute | Value | Explanation |
---|---|---|
width=" " | pixels or % | the size of the width |
Example
<table border="1">
<tr>
<td>Cell A</td>
<td>Cell B</td>
<td>Cell C</td>
</tr>
</table>
- Output
-
Cell A Cell B Cell C
<table border="1" width="100%">
<tr>
<td>Cell A</td>
<td>Cell B</td>
<td>Cell C</td>
</tr>
</table>
- Output
-
Cell A Cell B Cell C
and the height is 100 pixels (The height attribute for the TABLE element is non standard.)
<table border="1" width="250" height="100">
<tr>
<td>Cell A</td>
<td>Cell B</td>
<td>Cell C</td>
</tr>
</table>
- Output
-
Cell A Cell B Cell C