HTML表单用来选择不同种类的用户输入。
例如:
文本框
<html>
<body>
<form>
First name:
<input type="text" name="firstname">
<br>
Last name:
<input type="text" name="lastname">
</form>
</body>
</html>
这个例子说明了在HTML页面中如何创建文本框。在文本框中,用户可以输入文本。
密码框
<html>
<body>
<form>
Username:
<input type="text" name="user">
<br>
Password:
<input type="password" name="password">
</form>
<p>
Note that when you type characters in a password field, the browser
displays asterisks or bullets instead of the characters.
</p>
</body>
</html>
例子说明了在HTML页面中如何创建密码框。