To determine the width of a table on your web page use the WIDTH attribute in the <TABLE> tag. You can use a % of the page or a pixel number.
In this table the WIDTH=40%
<TABLE WIDTH=40% BORDER=2>
Grade | Pizza | Hamburger | Spaghetti |
---|---|---|---|
Grade 4 | 15 | 5 | 5 |
Grade 5 | 13 | 9 | 6 |
Grade 6 | 10 | 11 | 5 |
Grade | Pizza | Hamburger | Spaghetti |
---|---|---|---|
Grade 4 | 15 | 5 | 5 |
Grade 5 | 13 | 9 | 6 |
Grade 6 | 10 | 11 | 5 |
In this table the column widths are set to 25% forcing all the columns to be the same width.
<TH WIDTH=25%>...</TH> and <TD WIDTH=25%>...</TD>
Grade | Pizza | Hamburger | Spaghetti |
---|---|---|---|
Grade 4 | 15 | 5 | 5 |
Grade 5 | 13 | 9 | 6 |
Grade 6 | 10 | 11 | 5 |