Nested Tables
If you take a look at the puzzles, you can see that tables can be used
to create quite complicated patterns on an HTML page. However, most
times you would not want to use something this intricate. Suppose
Louella wanted to add the scores from the family outing to the bowling
alley to her newsletter. A table would serve quite nicely to arrange
their scores, one row per person with a cell for the name and a cell
for each game score. A top row for the column headings would be nice,
using the <th> tag instead of the <td> tag for the cells to
automatically use bold text.
| Name |
Game 1 |
Game 2 |
Game 3 |
Game 4 |
| Willa |
102 |
119 |
131 |
95 |
| Roy |
152 |
149 |
159 |
171 |
| Ruthann |
141 |
133 |
156 |
143 |
| Will |
189 |
182 |
159 |
171 |
However, adding these rows to the newsletter page as new lines in the
same table would mean some fiddling with the two column tags. The
solution is to create a new row beneath the last row of the newsletter
with a big cell stretching across the newsletter columns. You would
create it the same way you made the cell across the top of the columns
for the newsletter heading. Then you put this whole table into the
new cell on the bottom of the newsletter. This is called a nested table.
Louella's Tattle and Tips
|
Ruthann gets arrested!
Ruthann got into big trouble this year! She was building up her usual
head of Christmas cheer right on schedule for the feast, when her cheap
husband Sam decided to save a few pennies by buying presents from
unorthodox sources.
Ruthann started making her fancy fruitcakes for Christmas presents and
soaking them in extra rum as usual. The smell soon brought their cat
Fluffy to investigate. What happened next isn't clear. Sam claims
that the cat knocked a cake off the counter next to the floor heater.
Ruthann suspects it was Sam getting an early start on his cake.
Whoever was responsible for it, the flaming fruitcake set off the
kitchen fire alarm and brought the neighbors and the volunteer
fire department on the run. The police naturally showed up to
investigate the commotion. When a neighbor opened the broom closet
to help clean up the mess, a police officer saw (continued on page 2)
|
Crafting Tip
Got a lot of green tomatoes snatched off the vine before frost hit?
Cover them with a festive assortment of left-over house paint and heap
them high in a pretty bowl like Christmas ornaments. Eat your heart
out, Martha!
|
Quote of the Feast
The biggest turkeys do their gobbling on Christmas.
Said by Grandma Willa to Uncle Roy after he spilled giblet gravy on
her best crocheted tablecloth. He's rightly ashamed of himself.
|
Most Original Christmas Present
Little Will's giant windchimes, made from recycled CD's which proved to
have some naughty pictures on them. His mother is discreetly
investigating the source of his creativity.
|
|
Bowling Scores
| Name |
Game 1 |
Game 2 |
Game 3 |
Game 4 |
| Willa |
102 |
119 |
131 |
95 |
| Roy |
152 |
149 |
159 |
171 |
| Ruthann |
141 |
133 |
156 |
143 |
| Will |
189 |
182 |
159 |
171 |
|
<tr>
<td colspan=2 bgcolor="white">
<P>
<center><h5>Bowling Scores</h5></center>
<P>
<table width=100% cellpadding=5 border=1 align="center">
<tr align="center">
<th width=200 align="left">Name</th>
<th>Game 1</th>
<th>Game 2</th>
<th>Game 3</th>
<th>Game 4</th>
</tr>
<tr align="center">
<td align="left">Willa</td>
<td>102</td>
<td>119</td>
<td>131</td>
<td>95</td>
</tr>
<tr align="center">
<td align="left">Roy</td>
<td>152</td>
<td>149</td>
<td>159</td>
<td>171</td>
</tr>
<tr align="center">
<td align="left">Ruthann</td>
<td>141</td>
<td>133</td>
<td>156</td>
<td>143</td>
</tr>
<tr align="center">
<td align="left">Will</td>
<td>189</td>
<td>182</td>
<td>159</td>
<td>171</td>
</tr>
</table>
</td>
</tr>
You can add whatever text you like in the cell with the table. Retrieve
your newsletter.html file and add this row to it, then save it and
display it with your browser. Experiment with different background
graphics and colors in various parts of the table and its nested
table to see the effect.
Tip: A nested table is an easy way to neatly display several links to
other pages of your site or to different locations on a long page. You
can make a table of contents or an index this way, or put a horizontal
group of links at the bottom of your page evenly spaced along the
width of the page.
We've seen a lot of nice tricks to spruce up a page. Let's go on
to the puzzles now, starting with Little
Quilt.
HTML Puzzles
Last update: September 1, 2001
|