开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜