HTML Basics Tut...LOGIN

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

Next Section
<!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>
submitReset Code
ChapterCourseware