Home >>HTML Tutorial >HTML Form

HTML Form

HTML Form with all possible fields

An HTML Form is the collection of different input elements like text fields, password fields, checkboxe, radio-buttons, submit buttons and many more.
Syntax :
    
<form method="get" action="output.php">       
Enter your name<input type="text"/>       
Enter your email<inpt type="email"/>       
<input type="submit"/>    
</form>
Output Enter your name Enter your email

HTML Forms TextField

HTML Forms TextField is used to take input from users like user's name , father's name etc. Syntax :
       Enter your name<input type="text"/>
Output

HTML Forms Password Field

HTML Forms Password type is used for input fields that should contain Password in encrypted format. Syntax :
       Enter your Password<input type="password"/>
Output

HTML Forms Email Field

HTML Forms email type is used for input fields that should contain an e-mail address Syntax :
       Enter your Email <input type="email"/>
Output

HTML Forms Number Field

HTML Forms number type is used for input fields that should contain number Syntax :
       Enter your Mobile Number  <input type="number"/>
Output

HTML Forms radio-button Field

HTML Forms radio button type is used for single selection amongst multiple like your gender. Syntax :
      select your gender
      male <input type="radio" name="g" value="male" checked="checked"/>
      female <input type="radio" name="g" value="female"/> 
Output male female

HTML Forms checkbox Field

HTML Forms checkbox type is used for multiple selection like hobbies. Syntax :
select your hobbies      
reading <input type="checkbox" value="reading" />      
swimming <input type="checkbox" value="swimming" />      
singing <input type="checkbox" value="singing" />
Output reading swimming singing

HTML Forms textarea Field

HTML Forms textarea is used to take heavy input like resume or address etc. Syntax :
     
      Enter your Address<textarea></textarea>     
Output

HTML Forms file Field

HTML Forms file type field is used to upload the document like resume, image etc. Syntax :
      Upload your resume <input type="file" />
Output

HTML Forms select Field(Combo box)

HTML Forms select field is used to select input from drop down like select your country from drop down. Syntax :
Select your country      
<select>         
<option value=""> select your country </option>         
<option> india </option>         
<option> pakistan </option>         
<option> china </option>            
</select>
Output

HTML Forms submit button

HTML Forms submit button is used to submit your HTML form . Syntax :
      <input type="submit" value="Save My Data" />
Output

HTML Forms reset button

HTML Forms reset button is used to reset your HTML form's data . Syntax :
      <input type="reset" value="reset all Data" />
Output