Prev

Forms

Form Elements

Text Field

Remember: A text field allows the user to enter a small amount of text.

Try It: Add a form with a text field into your page. Try using the size attribute and typing into the field.
Another common form element is the text field, which allows the user to enter a short amount of text. It is an <input> tag with a type of "text". A helpful attribute for this text fields is the size attribute, which allows you to set the number of characters that are displayed in the text field, that is, how wide it is. For example, for a text field in which the user is entering a phone number, you may want to limit the size to 12 (10 numbers and 2 dashes).
Text Field Example
<form>
Phone Number: <input type="text" size="12">
</form>
is displayed as:
Phone Number:

Now you have all the tools to create a working form! You'll make a form that really works for the asynchronous chat activity.

End of Tutorial

Want to learn more? There is a lot more to know! Try following some of the links in this tutorial, do some research on your own, or get a book about HTML!

Prev