<input type="text" name="Name" value="default_value">With form and submit button.
<form method='POST' action=target_page.php>
<input type='text' name='topic' value='SEO basic'>
<input type='Submit' name='Name of the submit button' value='Submit'>
</form>
Text fields are data entry fields which takes small amount of data from the user ( textarea is used for large data ). This is one of the most widely used control of a WebForm.
Attribute | Description |
---|---|
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.(optional) |
Size | Width of the text field.(optional) |
Maxlength | Used to specify the maximum number of characters that can be entered into the textbox. |
Autocomplete | Input element should have autocomplete . |
autofocus | Focus ( crusher inside ) the input text box by default . DEMO of autofocus |
placeholder | Hint , help or about the input requirment can be given to user. DEMO of Placeholder |
readonly | Data can't be changed by user |
disabled | Disabled from user |