Login    New User    Forgot Password    Help      

HTML Form Elements

GO TO INDEX

The form input Elements

You can have different types of input elements in a form. Examples are: check boxes, radio buttons, simple text boxes etc.

List of form attributes

Attribute Code Output
Single line text box <input type="text" name="FirstName" />
Password Field <input type="password" /> 
Radio Buttons <input type="radio" name="sex" value="male" /> Male<br />
<input type="radio" name="sex" value="female" /> Female
Male
Female
Checkboxes <input type="checkbox" name="vehicle" value="Bike" /> I have a bike<br />
<input type="checkbox" name="vehicle" value="Car" /> I have a car 
I have a bike
I have a car
Submit Button <input type="submit" value="Submit" />
Drop down lists
<select name="degree">  
<option>Choose One</option>  
<option>Some High School</option>  
<option>High School Degree</option>  
<option>Some College</option>  
<option>Bachelor's Degree</option>  
<option>Doctorate</option>
</select>
Selection forms <select multiple name="music" size="4">
<option value="emo" selected>Emo</option>
<option value="metal/rock" >Metal/Rock</option>
<option value="hiphop" >Hip Hop</option>
<option value="ska" >Ska</option>
<option value="jazz" >Jazz</option>
<option value="country" >Country</option>
<option value="classical" >Classical</option>
<option value="alternative" >Alternative</option>
<option value="oldies" >Oldies</option>
<option value="techno" >Techno</option>
</select>
Upload forms
<input type="hidden" 
name="MAX_FILE_SIZE" 
value="100" />  <input name="file" type="file" />
Text areas
<textarea rows="5" 
cols="20" wrap="physical" 
name="comments">  
Enter Comments Here 
</textarea>

GO TO INDEX