|
You can set the width and height of the table with the width and height attributes in the <table> tag. If you don’t enter a width, the browser determines the width of the table by the content of each column. This example creates a table that is the full width of the Internet Explorer window: <table width="100%"> <tr> <td>Apples</td><td>Celery</td> </tr> <tr> <td>Oranges</td><td>Carrots</td> </tr> </table> In this example, the table width is given as a percentage of the total Internet Explorer window width. If you set the width to 75%, the table will always be 75% of the browser window no matter how wide or narrow the browser window is. You can also specify table widths in pixels. You can also use these attributes for table cells so that the width is not determined by the width of the widest data in the cell. Again, you can give the width as a percentage or in pixels.
|
More information Sizing a table |