HTML Form tags - I
HTML Form tags - I
Welcome friends, Here we describe HTML tags which are used for Creating Forms.
1. <form> :- <form> tag is ued to create forms where we collect information from user's.
2. <input> :- <input> It specifies an input field where user enter data.
Input fields are of so many types :-
1. Text
2. Number
3. Textarea
4. Button
5. Select and Option
6. Option Group
7. Datalist
Let's have an example and enjoy it:-
<html>
<head>
<title>HyperText Markup Language</title>
</head>
<body>
My Name is : <input type="text" name="aname"><br>
<select>
<textarea rows="5" cols="20"> This is a comment box type, which is measure in row and column format, where we can put our messages.</textarea>
<optgroup label="Indian Cities">
<option value="bhopal">Bhopal</option>
<option value="gwalior">Gwalior</option>
</optgroup>
<optgroup label="USA Cities">
<option value="newyork">New York</option>
<option value="washington">Washington</option>
</optgroup>
</select>
<fieldset> <legend>Contact Form :</legend>
Name: <input type="text" size="30"><br>
Email: <input type="text" size="30"><br>
Date of birth: <input type="text" size="10">
</fieldset>
<input list="cities">
<datalist id="cities">
<option value="Indore">
<option value="Bhopal">
<option value="Gwalior">
<option value="Jabalpur">
<option value="Ujjain">
</datalist>
<button type="button">Submit</button>
</body>
</html>
Welcome friends, Here we describe HTML tags which are used for Creating Forms.
1. <form> :- <form> tag is ued to create forms where we collect information from user's.
2. <input> :- <input> It specifies an input field where user enter data.
Input fields are of so many types :-
1. Text
2. Number
3. Textarea
4. Button
5. Select and Option
6. Option Group
7. Datalist
Let's have an example and enjoy it:-
<html>
<head>
<title>HyperText Markup Language</title>
</head>
<body>
My Name is : <input type="text" name="aname"><br>
<select>
<textarea rows="5" cols="20"> This is a comment box type, which is measure in row and column format, where we can put our messages.</textarea>
<optgroup label="Indian Cities">
<option value="bhopal">Bhopal</option>
<option value="gwalior">Gwalior</option>
</optgroup>
<optgroup label="USA Cities">
<option value="newyork">New York</option>
<option value="washington">Washington</option>
</optgroup>
</select>
<fieldset> <legend>Contact Form :</legend>
Name: <input type="text" size="30"><br>
Email: <input type="text" size="30"><br>
Date of birth: <input type="text" size="10">
</fieldset>
<input list="cities">
<datalist id="cities">
<option value="Indore">
<option value="Bhopal">
<option value="Gwalior">
<option value="Jabalpur">
<option value="Ujjain">
</datalist>
<button type="button">Submit</button>
</body>
</html>
Comments
Post a Comment