This Blog is for HTML Tutorials.

HTML Logo

HTML Table Width

The width attribute of the TABLE element specifies the width of a table.


<table width ="300">








Tips and Notes
This can be specified with CSS. Please see the "Related Document" for details on CSS.

Example

The width is not specified

<table border ="1>
<tr>
<td>Cell A </td>
<td>Cell B </td>
<td>Cell C </td>
</tr>
</table>




output




The width is 100%

<table border ="1" width ="100%">
<tr>
<td>Cell A </td>
<td>Cell B </td>
<td>Cell C </td>
</tr>
</table>



output




The width is 280 pixels

<table border ="1" width ="280" height="100">
<tr>
<td>Cell A </td>
<td>Cell B </td>
<td>Cell C </td>
</tr>
</table>


output



Post a Comment

0 Comments