表格说明:
- 该表格由四列和六行组成。
- 表单嵌入表格内
表格由两列六行组成
- 第 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>
我需要制作这张 table enter image description here
最佳答案
我已经修改了您的代码,请检查以下内容:
移出
form
来自table
;添加
</table>
调整
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>
关于html - HTML 表格内的表单出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61903749/