HTML Text Fields

Through Text field we receive the information from the viewers and the text field always appear in small rectangular  box.<input type="text"/>  defines the one-line input field  and the user can inter the information into it .Now here is the example that make you concept clear,now see
Example:


<form name="HTML Form" action="mailto:youremail@email.com" method="post">
First: <input title="Enter Your First Name" id="first" name="first" type="text" /> Last: <input title="Enter Your Last Name" id="last" name="last" type="text" />
<input type="submit" value="SUBMIT" />
</form>


Your Result:


First:  Last:  


HTML Text fields: maxlength  Attribute
We can set maximum character strength,how much the user can type the number of character in the text field.here is the example you can text or check it
Example:

<form name="HTML Form" action="mailto:youremail@email.com" method="post">
First: <input title=" Enter Your First Name" id="first" name="first" type="text" size="12" maxlength="3" value="John" /><br />
Last: <input title="Enter Your Last Name" id="last" name="last" type="text" size="18" maxlength="3" value="William" /><br />
<input type="submit" value="SUBMIT" />
</form>


Your Result:
First: 
Last: 

No comments:

Post a Comment