在html中的表格内部存在表格问题

问题描述 投票:1回答:1

表格说明:

  1. 该表由四列和六行组成。
  2. 表格被嵌入表格内
  3. 表由两列和六行组成

    • 第2列第2行中的文本和文本框跨越四行
    • 有两个标签用于分隔文本和文本框

      <table>
          <form name="application" method="post" action="">
          <tr>
              <th>Application Form</th>
          </tr>
          <tr>
              <td>First Name<input name="firstname" type="textbox" size="20"</td><br>
              <td rowspan="4">Countries and places you wish to visit:<br><br>
              <textarea></textarea></td></td>
          </tr>
          <tr>
              <td>Last Name:<input type="textbox" size="20"></td>
          </tr>
          <tr>
              <td>Phone number:<input type="textbox" size="20"></td>
          </tr>
          <tr>
              <td>Email:<input type="textbox" size="20"></td>
          </tr>
          <tr>
               <th colspan="4"><input type="submit" name="submit" id="submit" value="Submit">
              <input type="reset" name="reset" id="reset" value="Reset"></th>
          </tr>
          </form>
      

      我需要制作这张桌子enter image description here

html-table
1个回答
0
投票

我已经修改了您的代码,请检查以下内容:

  1. form中移出table

  2. 添加</table>

  3. 调整textarea;

<form name="application" method="post" action="">
  <table cellpadding="10px">
    <tr>
        <th>Application Form</th>
    </tr>
    <tr>
        <td>First Name:<input name="firstname" type="textbox" size="20"</td>
        <td>Countries and places you wish to visit:</td>
    </tr>
    <tr>
        <td>Last Name:<input type="textbox" size="20"></td>
        <td rowspan="3" valign="top">
          <textarea></textarea>
        </td>
    </tr>
    <tr>
        <td>Phone number:<input type="textbox" size="20"></td>
    </tr>
    <tr>
        <td>Email:<input type="textbox" size="20"></td>
    </tr>
    <tr>
       <th colspan="4">
         <input type="submit" name="submit" id="submit" value="Submit">
         <input type="reset" name="reset" id="reset" value="Reset">
       </th>
    </tr>
  </table>
</form>
© www.soinside.com 2019 - 2024. All rights reserved.