Text Field of HTML form

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.


<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". Here is an example

TextArea to enter more text

Your Rating


Post Comment This is for short comments only. Use the forum for more discussions.

HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us
©2000-2017 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer