A form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. A form can also contain select lists, textarea, fieldset, legend, and label elements.
The <form> tag is used to create an HTML form:
The form tag must be embedded anywhere between the body tags <body></body> in the HTML document to make it work. To work fully form requires a server side programming language like PHP (we won't go into that now). You can Check PHP Class @ http://goo.gl/LxG6h
To create a Form
First you write the Form opening tag <form>
Then enter form input elements eg <input type="text" />
Then close the Form with closing tag </form>
<input type="text" /> defines a one-line input field that a user can enter text into:
First name: <input type="text" name="firstname" /><br />
Last name: <input type="text" name="lastname" />
<input type="password" /> defines a password field:
<input type="checkbox" /> defines a checkbox. Checkboxes let a user select ONE or MORE options of a limited number of choices.
<input type="checkbox" name="vehicle" value="Bike" /> I have a bike<br />
<input type="checkbox" name="vehicle" value="Car" /> I have a car
Textarea <textarea></textarea> is where user can enter huge amount of text. Unlike the text field, it contains big amount of text.
<textarea rows="10" cols="30">
The cat was playing in the garden.
DropDown List <select><option></option></select> is used to list options that can be selected by user.
<option value="Achebe1">Thing Fall Apart</option>
<option value="Achebe2">No longer at Ease</option>
<option value="Achebe3">A Man of the People</option>
<option value="Achebe4">Chike and the River</option>
<input type="submit" /> defines a submit button.
A submit button is used to send form data to a server. The data is sent to the page specified in the form's action attribute. The file defined in the action attribute usually does something with the received input:
andy chuksAsk Questions if you are confused.
Assignment: Create a Webpage containing a dropdown menu form with a preselected option. 0022 April 2011
dan henryI'd prefer working with the design view when i'm on Dreamweaver cos the language coding can really be pretty hard to understand.Creating a form is not necessarily a problem to me but but adding an action to it,i mean the submission aspect.How do i do this using Dreamweaver or even FrontPage? 0030 December 2011