HTML Form
HTML Form
TEXT FIELD- Text field are Used When you want the user to type Latter, Num-
ber etc. in a form.
EXAMPLE-
<Html>
<Head>
<Title> text field</title>
</head>
<Body>
<Form>
First Name:
<input type=”text” name=”First Name”><br>
Last Name:
<input type=”text” name=”Last Name”><br>
Father’s Name:
<input type=”text” name=”Father’s Name”><br>
Mother’s Name:
<input type=”text” name=”Mother’s Name”>
</form>
</body>
</html>
RADIO BUTTONS-
Radio Buttons are used when you want to the user to select one of
limited Number of choice.
EXAMPLE-
<Html>
<Head>
<Title> Radio Button’s</title>
</head>
<Body>
<Form>
<input type=”Radio” name=”Sex” value=”Male”>
Male <br>
<input type=”Radio” name=”Sex” value=”Female”>
Female
</form>
</body>
</html>
CHECKBOX-
Checkbox are used when you want to select one or more Options of a
limited number of choices.
EXAMPLE-
<Html>
<Head>
<Title> Checkbox</title>
</head>
<Body>
<Form>
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”>
<Br>
I have a Hotel
<input type=”Checkbox” name=”Vehicle” value=”Hotel”>
</form>
</body>
</html>
FORM, ACTION ATTRIBUTE & THE SUBMIT BUTTON-
When the user clicks on the submit button the content of the form is
sent to another file. The form’s action attribute define the name of
the file to send the content to IIS Manager. The file defined in the ac-
tion attribute usually does something with the received input
EXAMPLE-
<Html>
<Head>
<Title> Submit Button’s</title>
</head>
<Body>
<form name=”input” action=”html_From_action.asp” method=”put”>
User Name:
<input type=”text” name=”user”>
<input type=”submit” value=”submit”>
</form>
</body>
</html>
CREATE A BUTTON-
This Example demonstrates how to create a button. On the button
you can define your own text.
EXAMPLE-
<Html>
<Head>
<Title> Button</title>
</head>
<Body>
<Form>
<input type=”button” value=”Hello India”><br>
<input type=”button” value=”Apply”><br>
<input type=”button” value=”Submit”>
<input type=”button” value=”Cancel”>
<input type=”button” value=”OK”>
<input type=”button” value=”Gmail”>
<input type=”button” value=”Facebook”>
<input type=”button” value=”Google”>
<input type=”button” value=”More”>
</form>
</body>
</html>
EXAMPLE-
<Html>
<Head>
<Title> Fieldset</title>
</head>
<Body>
<Fieldset>
<Legend>Health Information</legend>
<Form>
Height:
<input type=”text” size=”3”><br>
Weight:
< input type=”text” size=”3”><br>
B.P.
<input type=”text” size=”3”><br>
Sugar:
<input type=”text” size=”3”>
</form>
</Fieldset>
</body>
</html>
SIMPLE DROP-DOWN MENU’S
This Example Demonstrate How to create a simple Drop-Down Menu
on an HTML Page. A Drop-Down box(menu) is a selectable list.
EXAMPLE-
<Html>
<Head>
<Title> Drop Down Menu</title>
</head>
<Body>
<form>
<Select name=”Disttrict”>
<option value=”ballia”>Ballia</option>
<option value=”Basti”>Basti</option>
<option value=”Faizabad”>Faizabad</option>
<option value=” Varanasi”>Varanasi</option>
<option value=” Kanpur”>Kanpur</option>
<option value=” Sant Kabeer Nagar”>Sant Kabeer Na-
gar</option>