search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

HTML Basics Tutorial: Nesting of Forms and Tables

The registration page created before, the alignment of several elements is chaotic

16.png

We can use the nesting of tables and forms to make the page more regular

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

It can be seen that it is more complicated to use table to create such a regular interface, and it will not be used frequently in the future. It is more likely to be implemented using DIV+CSS that will be learned later

new file
<!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>
Reset Code
Automatic operation
submit
Preview Clear