Webmaster Resources Center


Forms Tutorials

Text Input Fields

The Text Input field allows visitors to type text directly into your Form. You can add a Text Input field to your form using a <input> tag. These are used in any situation you want to ask visitors to add text to the form, be it a name, a street address, an email address or whatever. The <input> tag requires a few attributes to work properly:

  1. TYPE - specifies the field is for entering text


The type="text" value tells the input tag to treat the information added into the field as text. It is written like this:

<input type="text"

The name should always be something unique that identifies what the field is for. If you were gathering street addresses in this field, for example, you could give this field a name like "address" or "street_address". Add the name like this:

<input type="text" name="unique"

The value field allows you to pre-fill the displayed input field with some text. This is commonly used in fields asking for web url's. Webmasters will often pre-fill the 'http://' portion of the url since all url's have that. If you do not wish to pre-fill the field leave the value field blank:

<input type="text" name="unique_name" value=""


<input type="text" name="unique_name" value="" size="15"





And here is how it will look on a webpage:

Enter some sample text here:

Note: The text in the text box is not affected by font tags or other HTML formatting codes, it is always displayed in the default browser font as shown above. (You can use CSS coding to alter the look and color of text in this field)