HTML Input

The important and most useful element is the Input element and this element is use for the selection of user information.An input elements are use in many ways and its depend upon the type of attribute.we can use the html elements for the following purposes like checkboxs,radio button,text fields ,submit buttons and many more.The name input comes from the<input> tag and which is the mark-UP and its work show by its name.Similarly the type attribute identify how the web browser behave this attribute and what kind of result you want to see Options are are you want to see the text ,checkbox,radio button,submit button,reset,Password and hidden form elements what you want,because every attribute have there own function and presention.Here i want to show you with the example,no see
Example:

<formg name="HTML Form" action="mailto:youremail@email.com" method="post">
   Check the Box: <input type="checkbox" /><br />
   Name: <input type="text" /><br />
   Yes: <input type="radio" /> No: <input type="radio" /><br/>
   <input type="submit" value="SUBMIT" /> 
   <input type="reset" value="RESET" />
</form>

Your Result:

Check the Box: 
Name: 
Yes:  No: 





HTML Web forms: Value Attribute
The value attribute plays a different role and it depending upon the type of the input field that you put or set,like when we create an submit button,the value attribute  define the text inside the submit button.Now i want to teach you with example
Example:

<form name="HTML Form" action="mailto:youremail@email.com" method="post">
   Check Me: <input type="checkbox" /><br />
   Name: <input type="text" value="John" /><br />
   Yes: <input type="radio" /> No: <input type="radio" /><br />
   <input type="submit" value="Send" /> 
   <input type="reset" value="Clear" />
</form>

Your Result:

Check Me: 
Name: 
Yes:  No: 



HTML Web forms:name and id attribute
To set the name and id attributes inside the html forms is a good thing.The name  and id will later help us as a link of our html form and the server side script ,thats why we want to set the name and id attribute in html forms.here is the example now see
Example:

<formg name="HTML Form" action="mailto:youremail@email.com" method="post">
   Check Me: <input name="" id="" type="checkbox" /><br />
   Name: <input name="userName" id="userName" type="text" /><br />
   Yes: <input name="radioItem" id="radioItem" type="radio" /> No: <input name="radioItem" id="radioItem" type="radio" /><br />
   <input name="submitForm" id="submitForm" type="submit" value="SUBMIT" /> 
   <input name="resetForm" id="resetForm" type="reset" value="RESET" />
</form>

Your Result:

Check Me: 
Name: 
Yes:  No: 







No comments:

Post a Comment