How do I create this table?
----------------------------
| | | C | D |
| A | B |------+-----开发者_StackOverflow社区|
| | | E | F |
----------------------------
Both A and B need a ROWSPAN of 2. What's the HTML for that?
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>
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>
精彩评论