Go ahead and remove value="44 Cherry St".
<form> <input type="text" name="address" size="30"> </form>
If we want, we can specify how many characters a user can input.
Just go ahead and try to input more than 10 characters!
<form>
<input type="text" name="address" size="30" maxlength="10">
</form>
I suppose this feature might come in handy now and then, but unless you think someone's going to send the whole King James Bible down the pike at you, I wouldn't worry about it.
Very similar to the type="text" is the type="password". It is exactly the same, except it displays **** instead of the actual input. The form will send you the input, it just won't display it.
<form>
<input type="password">
</form>
Go ahead, type something in the box.
Remember that each <input> must have a name.
<form>
<input type="password" name="userpass">
</form>
Size, value, and maxlength attributes work with the password input also. By the way, a <tag> tells the browser to do something. An attribute goes inside the <tag> and tells the browser how to do it.
Form Tutor |
Lessons: Intro 1 2 3 4 5 6 7 8 9 10 11 12 13 Quick Forms Reference |
HTML 4.0 Reference Barebones HTML Guide |
![]() |