Table 3.1. Just Enough HTML—The Basics
||Presents tabular data on a Web page|
||Begins a row inside the table|
||Heading cells for the columns in the table|
||Contains each cell in the table|
Around and Around with Loops
More about loops
The kind of loop that we mostly use in this book is the
for loop, named after the command that begins the loop. This sort of loop uses a counter, which is a variable that begins with one value (usually 0) and ends when a conditional test inside the loop is satisfied.
The command that starts the loop structure is immediately followed by parentheses. Inside the parentheses you'll usually find the counter definition and the way the counter is incremented (i.e., the way the counter's value is increased).
); however, the third row contains the Free space, so one table cell in that row contains the word "Free". Note that each cell has an
id attribute, which the script uses to manipulate the cell contents. The
id is in the form of
square23, for reasons that we'll explain below. At the bottom of the page, there's a link that generates a new card.
Script 3.1. This HTML page creates the skeleton for the Bingo card.
Figure 3.1 This Bingo card has randomly generated numbers, but it isn't a valid Bingo card. Yet.