HTML FORMS
HTML FORMS
In HTML we make different types of forms by using html5 and css3.
THE <form> Element
The <form> element is used to create a form.
The syntax is.
<form>
//some code here...
</form>
The <input> Element
The <input> element is used under <form> element.It is used to create textboxes,textarea,checkbox and etc.
The syntax is.
<form>
<input type = "text" name = "fname">
</form>
In <input> element we have to give a type in which we want to show our <input> element.We have various types of <input> element types.
Input types
1. <Input type = "text">
In this input type a textfield was created .
The systex is ....
First name: <input type="text" name="fname">
Output..
First name :
2. <Input type= "Password">
In this input type a textfield which accepts password was created .
The syntax is ...
2. <Input type= "Password">
In this input type a textfield which accepts password was created .
The syntax is ...
Enter password : <Input type= "Password" name ="pwd">
Output...
Enter password :
In this input type a submit button was created.
The syntax is...
4.<Input type = "Reset">
In this input type a reset button was created.
The syntax is...
<Input type ="Reset" name ="Reset">
3. <Input type = "Submit">
The syntax is...
Output...
<Input type ="Submit" name ="submit">4.<Input type = "Reset">
In this input type a reset button was created.
The syntax is...
<Input type ="Reset" name ="Reset">
Output...
5. <Input type = "tel">
In this input type a textfeild was created that accepts numbers.
It does not means that it does not accept alphabet it accepts both number as well as alphabets.
The syntax is...
<Input type="tel" name="tnumber">
Output...
Enter phone number :There are some more input types which are as follows.
- <Input type="radio">
- <Input type="checkbox">
- <Input type="button">
- <Input type="color">
- <Input type="week">
- <Input type="date">
- <Input type="datetime-local">
- <Input type="email">
- <Input type="month">
- <Input type="search">
- <Input type="number">
- <Input type="url">
- <Input type="time">
- <input type="range">
Comments
Post a Comment