Mawg
Mawg

Reputation: 40215

How do I create this table?

----------------------------
|     |       |  C   |  D  |
|  A  |   B   |------+-----|
|     |       | E    | F   |
----------------------------

Both A and B need a ROWSPAN of 2. What's the HTML for that?

Upvotes: 0

Views: 83

Answers (2)

Kalessin
Kalessin

Reputation: 2302

This should do what you're looking for:

<table>
  <tr>
    <td rowspan="2">A</td>
    <td rowspan="2">B</td>
    <td>C</td>
    <td>D</td>
  </tr>
  <tr>
    <td>E</td>
    <td>F</td>
  </tr>
</table>

Upvotes: 8

dtbarne
dtbarne

Reputation: 8210

First off, if you're using this for a layout, don't. Use divs and CSS.

If you're using tabular data, then:

<table>
    <tr>
        <td rowspan="2">A</td>
        <td rowspan="2">B</td>
        <td>C</td>
        <td>D</td>
    </tr>
    <tr>
        <td>C</td>
        <td>D</td>
    </tr>
</table>

Upvotes: 1

Related Questions