HTML and CSS Reference
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:
<th colspan=”4”>First Quarter</th>
Notice that the colspan attribute is set to the maximum number of columns in
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
In this Try It you learn how to create a
You will need the tpa_jupiter.html file from the Lesson_16 folder, as well as a text editor and
Open your text editor.
From the Lesson_16 folder, open tpa_jupiter.html .
Put your cursor after the closing </p> tag that follows the text Here's a quick overview:
and press Enter (Return).