HTML » input » type="text"

The type="text" control displays a one line text input window into which the user can type the requested information (such as an address or phone number). If the requested information will require more than one line to enter, you should use a textarea tag rather than a type="text" control.

The default window size is browser dependent and is usually 20-30 characters in length. It is strongly recommended that you set the size of a text window rather than using the default. This will allow you to effect the appearance of the form in a pleasing and useful manner. Further, the appearance of the form will be fairly independent of the browser being used.

The default window size is browser dependent and is usually 20-30 characters in length. However, you can set the size using style sheets or the size attribute. The maxlength attribute can be used to set the maximum number of characters that will be accepted by the control (field). You can use the value attribute to display a text inside the window, but this is optional.