Html表格-为什么我的第三行出现在第二行

Html表格-为什么我的第三行出现在第二行,html,html-table,row,cell,Html,Html Table,Row,Cell,为什么下面的html会生成一个包含2x2个单元格的表格,而不是3行,第一行包含2个单元格,第二行包含一个跨2的单元格 <table cellpadding="5" width="200"> <tr> <td><img id="Button1_logoImg" src="" style="height:75px;width:75px;" alt="sButton1_logoImg" /></td><td>

为什么下面的html会生成一个包含2x2个单元格的表格,而不是3行,第一行包含2个单元格,第二行包含一个跨2的单元格

<table cellpadding="5" width="200">
    <tr>
        <td><img id="Button1_logoImg" src="" style="height:75px;width:75px;" alt="sButton1_logoImg" /></td><td><img id="Button1_errorImg" src="" style="height:50px;width:50px;" alt="Button1_logoImg" /></td>
    </tr>
    <tr>
        <td width="100%" rowspan="2"><input name="Button1$mainTextTb" type="text" value="changed" id="Button1_mainTextTb" style="font-size:20pt;width:180px;" /></td>
    </tr>
    <tr>
        <td rowspan="2" width="100%"><span id="Button1_subTextLbl" style="font-size:12pt;">sub text</span></td>
    </tr>
</table>

子文本

将第2行和第3行中的rowspan替换为colspan。

您的代码

<table cellpadding="5" width="200">
    <tr>
        <td><img id="Button1_logoImg" src="" style="height:75px;width:75px;" alt="sButton1_logoImg" /></td><td><img id="Button1_errorImg" src="" style="height:50px;width:50px;" alt="Button1_logoImg" /></td>
    </tr>
    <tr>
        <td width="100%" rowspan="2"><input name="Button1$mainTextTb" type="text" value="changed" id="Button1_mainTextTb" style="font-size:20pt;width:180px;" /></td>
    </tr>
    <tr>
        <td rowspan="2" width="100%"><span id="Button1_subTextLbl" style="font-size:12pt;">sub text</span></td>
    </tr>
</table>

子文本
将rowspan替换为colspan

编辑代码

  <table cellpadding="5" width="200">
        <tr>
            <td><img id="Button1_logoImg" src="" style="height:75px;width:75px;" alt="sButton1_logoImg" /></td><td><img id="Button1_errorImg" src="" style="height:50px;width:50px;" alt="Button1_logoImg" /></td>
        </tr>
        <tr>
            <td width="100%" colspan="2"><input name="Button1$mainTextTb" type="text" value="changed" id="Button1_mainTextTb" style="font-size:20pt;width:180px;" /></td>
        </tr>
        <tr>
            <td colspan="2" width="100%"><span id="Button1_subTextLbl" style="font-size:12pt;">sub text</span></td>
        </tr>
    </table>

子文本

因为第二行的行跨度为2?哦,天哪-我需要第二行的行跨度为表格的宽度,即2个单元格。