SQL PHP HTML JavaScript articles and free code
 

Text Field

Text fields are data entry fields which takes small amount of data from the user. This is one of the most widely used control. A text field can be placed by using the following format.
<input type="text" name="<Name of the field>" value="<Default value of the object>">

Attributes of Text Field:
Name: This attribute specifies the name of the object through which it can be referenced.
Value: This is used to specify the value of the text field.
Size: This attribute is used to specify the width of the textfield
Maxlength: Used to specify the maximum number of characters that can be entered into the textbox.
Align: Used to specify the alignment of the field. This attribute possibly takes the following values : Top, Middle, Bottom, Right, Left, AbsMiddle, AbsBottom.

Example:
<input type="text" name="txtbox" value="Simple Text">

This places a text field(single line text area) within the HTML form, which can be referenced by using its name "txtbox" and whose value is "Simple Text". The textbox looks like :


Discuss this tutorial at forum

List of HTML Tutorials

Form Fields  | Text Field  | Hidden Field  | Password Field  | TextArea  | RadioButton  | Checkbox  | Button  | Image Button  | Submit Button  | Reset Button  | Drop-Down Menu
 

Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.

Scripts
PHP
JavaScript
List of HTML Tutorial
<Form>
HTML Tags
Color Chart
HTML Calendar
Tags on web page
Web Design
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.