HTML and CSS Reference
In-Depth Information
You're not limited to one set of colspan or rowspan attributes in a table.
For example, if you wanted to add another heading that would span both the
Atlantic and Pacific Division headings in the previous example, you would code
it this way:
<tr>
<th colspan=”4”>First Quarter</th>
</tr>
Notice that the colspan attribute is set to the maximum number of columns in
the table.
As you can see from the code, the rowspan
attribute is placed in the first <th> tag, and
followed by a <td> tag, instead of another
<td> tag. The next table row contains the
other spanned content. The process then
repeats for the second rowspan attribute.
The browser-rendered results are shown in
Figure 16-5.
Try iT
FiGure 16-5
In this Try It you learn how to create a
simple table.
Lesson requirements
You will need the tpa_jupiter.html file from the Lesson_16 folder, as well as a text editor and
web browser.
You can download the code and resources for this lesson from the topic's web
page at www.wrox.com .
step-by-step
1.
Open your text editor.
2.
From the Lesson_16 folder, open tpa_jupiter.html .
3.
Put your cursor after the closing </p> tag that follows the text Here's a quick overview:
and press Enter (Return).
Search WWH ::




Custom Search