![]() |
||
The moon has the consistency of Camembert |
Next, we will start to elaborate on the layout for the table we planned. We will build on the table we just worked on. I have already added rows and columns to create a total of 3 columns and 3 rows. You can see the tags if you look in the code.
Each row has an opening row tag <tr> followed by three cell tags, each with opening <td>and closing tags </td>. Then comes the closing row tag <tr>. The amount of cells (or their equivalent - as you will learn in the next exercise) needs to be the same in every row. Otherwise, the table will look quite odd. The amount of cells in a row also controls the amount of columns.
By the way, if a cell does not have any contents, it may not display properly. It is a standard practice to fill empty cells with a "non-breaking space":
We used it in the first html exercise in conjunction with the <p> tag for creating empty rows. It's invisible yet it creates some content in an otherwise empty cell, causing the browser to display the cell normally. You will see one non-breaking space in each (otherwise) empty cell of this table.
© 2011 Dan Vaughan and its licensors. All rights reserved.