<Body>
<Formaction = "" method = "Post" name = "loginform">
<Table> <tr> <TD> Username
: </TD> <inputtype = "text" name = "username" size = "25"/> <br/> </TD> </tr> <tr> <TD> Password
: </TD> <inputtype = "password" name = "password" size = "25"/> <br/> </TD> </tr> <tr> <tdwidth = "30%"> <inputtype = "button" name = "but_loginsubmit" onclick = "login () "value = 'login'/> </TD> </tr> </table> </form> </body>
On the surface, the above User Name text box and Password box should be of the same size, but the actual display result is not so, but if we use style to control its properties, the results will be different:
<Body> <form action = "" method = "Post" name = "loginform"> <Table> <tr> <TD> Username: </TD> <input type = "text" name = "username" style = "width: 200px "/> <br/> </TD> </tr> <TD> password: </TD> <input type = "password" name = "password" style = "width: 200px "/> <br/> </TD> </tr> <TD width =" 30% "> <input type =" button "name =" but_loginsubmit "onclick = "login () "value = 'login'/> </TD> </tr> </table> </form> </body>
Therefore, we can use style = "width: 200px" to unify the length.