8. Table tags
• The <table> tag indicates the beginning of a
table
• The <tr> tag indicates the beginning of a row.
• The <td> tag indicates the beginning of a cell
• Not used yet, the <th> tag indicates a header
cell
9. Non-breaking space
• The code gives one a non-breaking
space. It’s a space but it will not allow
breaking, i.e. returning to the next line on the
page if the line is long.
• The table generated has non-breaking spaces
in the <td> table data elements (cells) so that
they are not empty. Empty cells may be
rendered differently from cells with content.
10. Merge the cells in the first row by highlighting them (in
design) and going to Table/Modify/Merge Cells
11. The colspan attribute that arose from
merging the cells
One cell now spans all
eight columns of the table
12. Merge the second row. Enter the text between the
open and close tag. Switch the tags from <td> to <th>
17. Code to make top header have gray
background and white font color
We don’t want to style all of
the headers but just the top
one. There are several ways
to this this.
1. Apply an inline style to
the particular <th>
2. Define the style for a
class and set the <th>’s
class attribute to that
value (allows more than
one item to have that
style)
3. Define the style for an
item with a particular id
and set the <th>’s id
attribute to that value