|
How to Insert Form in Html Page |
|
To insert form in html you have to use <form> tag. There are various elements available which allow you to insert the information like text field, textarea, radio button, checkbox, drop-down menu etc. Alone with the <form> tag used <input> tag to specified the attribute type.
Text Fields
Text field use to put text, numbers etc in form.
Radio Button
Used when you want user to select limited choices.
Checkbox
Used when you want user to select more option.
Use following code to insert form:
<form>
First name:
<input type="text" name="firstname" />
<br />
Last name:
<input type="text" name="lastname" />
<br />
<input type="radio" name="sex" value="male" /> Male
<br />
<input type="radio" name="sex" value="female" /> Female
<br />
I have a bike:
<input type="checkbox" name="vehicle" value="Bike" />
<br />
I have a car:
<input type="checkbox" name="vehicle" value="Car" />
<br />
I have an airplane:
<input type="checkbox" name="vehicle" value="Airplane" />
</form>
Result will be:
|
|
|
|
|