HTML Contact forms:
HTML Forms are required, when you want to collect some data from the site visitor. For example, during user registration you would like to collect information such as name, address, email ID, etc.
A form will take input from the site visitor and then will post it to a back-end application such as CGI, ASP Script or PHP script etc. The back-end application will perform required processing on the passed data based on defined business logic inside the application.
There are various form elements available like text fields, radio buttons, checkboxes, textarea field, drop-down menus, etc.
The HTML <form> tag is used to create an HTML form and it has the following syntax −
A form will take input from the site visitor and then will post it to a back-end application such as CGI, ASP Script or PHP script etc. The back-end application will perform required processing on the passed data based on defined business logic inside the application.
There are various form elements available like text fields, radio buttons, checkboxes, textarea field, drop-down menus, etc.
The HTML <form> tag is used to create an HTML form and it has the following syntax −
<form >
<label>Full name:</label>
<input type="text" id="fullName" name="fullName" maxlength="25" placeholder="Enter your full name here"><br>
<input type="submit" value="Submit">
</form>
<label>Full name:</label>
<input type="text" id="fullName" name="fullName" maxlength="25" placeholder="Enter your full name here"><br>
<input type="submit" value="Submit">
</form>
Explanation of the attributes used:
1. type:
Indicates the type of input control and for text input control it will be set to text.
2. name:
Used to give a name to the control which is sent to the server to be recognized and get the value.
3. placeholder:
This can be used to provide an initial value inside the control.
4. size:
Allows to specify the width of the text-input control in terms of characters.
5. maxlength:
Allows to specify the maximum number of characters a user can enter into the text box.
1. type:
Indicates the type of input control and for text input control it will be set to text.
2. name:
Used to give a name to the control which is sent to the server to be recognized and get the value.
3. placeholder:
This can be used to provide an initial value inside the control.
4. size:
Allows to specify the width of the text-input control in terms of characters.
5. maxlength:
Allows to specify the maximum number of characters a user can enter into the text box.
Happy Learning!
No comments:
Post a Comment
Comments