Webpage Forms in HTML
Forms in HTML are basically used to get variety of information from the HTML viewer online. Form has made web pages a lot more interactive. Form is an area that typically contains many form fields. These fields e.g. text box, check box, radio button and drop down list etc. appear on front end of the form. They are used by page viewer to provide information which is being processed at the back end of the form. Form processing is done by the program at the server. In HTML programming, form input elements reside in between <form > and </form> tags.
Form tag has two attribute:
Action: This attribute is used to provide the location of the scripting program which is used for handling form submission.
Method: This attribute has two values, get and post. Get value is used by default. Get method sends all the input information of the form fields as part of the url while post method will send all the input fields information to the data server without displaying any information to the page viewer and input information is not reflected in web browser’s URL.
Input fields: Text Field in the form has following attributes
Type: It provides the type of input information in the field. It can take three values i.e. text, submit, password.
Maxlength: It provides information regarding maximum no of characters that can be written into input field.
Name: This is the reference name for the page viewer.
Check box provides multiple inputs from a similar category to the web user. It has following:
Attributes:
Name: This attribute specify the category of the check box
Value: This attribute specify the value of the check box which will be used by the form processor.
Radio Button provides page viewer multiple options for a particular category to choose from. It has following attributes:
Name: It provides category to the radio buttons.
Value: It provides the information that will be sending to the form processor.
Following is the HTML syntax for writing forms in HTML. First Name and Middle name inputs are received by viewer and submitted to form processing using “Next” button
<form method = “post” action= “script_file”>
First Name: <input type= “text” maxlength= “50″ name= “name1″><br/>
Middle Name: <input type= “text” maxlength= “50″ name= “name2″><br/>
<input type= “submit” value= “Next”><br/>
</form>
Recent Topics
- Working with Images in HTML Documents
- Webpage Forms in HTML
- Web Safe Colors in HTML
- Use Ordered Lists in a Webpage
- Top Graphic Editing Software in Webpage Design
- Tables and Frames in HTML
- Structure of an HTML Document
- Setup Cascade Style Sheets (CSS) in HTML files
- HTML and XHTML in Webpage Creation
- HTML and Meta Tags for Search Engine Optimization
- How to Validate HTML File
- How to Use Hexadecimal Color Codes in HTML
- How to Create Website Banners
- Formatted Lists in HTML Document
- Embedding HTML in PHP





