<class home>  <html part II>   <back   next>

html continued

Setting Table Width:

Table widths should be set to aid the browser in drawing the table quickly. The browser can automatically adjust the table if no values are given to fit the content of the table.
The standard table is 600 pixels wide. If you make it wider. The user may need to scroll to the right.
Table widths can be set as percentages of a page, which will adjust dyanamically as you scale the page, but these make the loading of the page slower and will alter the look of your layout.
note: Make sure your percentages add up to 100% or you may have a problem.

33% 33% 34%

cell cell cell
cell cell cell

To control the width of the whole table use the width attribute in the <table> tag.
To control the width of individual cells, use the width attribute in the <td> tags


example>>>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<title>Pony Pony Pony</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" border=3>
<tr>
<td width="40%"> <img src="pony.gif" /></td>
<td> The pony is next to me.
</tr>
<tr>
<td>Here is a picture of my pony in a table.</td>
<td>&nbsp;</td>
<!--Put in a &nbsp; in any cell that is empty or your table may not display properly-->
</tr>
</table>

<table width="320" border=3>
<tr>

<td width="320"> <img src="pony2.gif"></td>
</tr>
<tr>
<td>Here is another picture of my pony in a table.</td>
</tr>

</table>

</body>
</html>