HTML の基本チュートリアル: フォームとテーブルのネスト

以前に作成した登録ページでは、いくつかの要素の配置がわかりにくかったです

16.png

テーブルとフォームのネストを使用して、ページをより規則的にすることができます

<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>用户注册</title>
    </head>
    <body>
        <font size="5" color="red">欢迎注册php.cn</font>
        <form name="user" method="get" action="" >
            <table>
                <tr>
                    <td>用户名:</td>
                    <td><input type="text" name="username"/></td>
                </tr>
                <tr>
                <td>密码:</td>
                <td><input type="password" name="userpwd"/></td>
                </tr>
                <tr>
                <td colspan="2" align="left"><input type="submit" value="提交信息"/></td>
                </tr>
            </table>
        </form>
    </body>
</html>

そのような規則的なものを作成するにはインターフェイス、テーブル比較を使用します。複雑なので、今後は頻繁に使用されません。後で学習する DIV+CSS を使用して実装される可能性が高くなります。

学び続ける
||
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
</head>
<body>
<font size="5" color="red">php.cn</font>
<form name="user" method="get" action="" >
<table>
<tr>
<td></td>
<td><input type="text" name="username"/></td>
</tr>
<tr>
<td></td>
<td><input type="password" name="userpwd"/></td>
</tr>
<tr>
<td colspan="2" align="left"><input type="submit" value=""/></td>
</tr>
</table>
</form>
</body>
</html>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
图片放大关闭