Free WebSchools.com

Google



Submit Article ForumsLive chat WebhostingSEO ToolsLink TO UsResources


HOME

HTML Basic

HTML Introduction
HTML Basic Tags
HTML Formatting

HTML Entities
HTML Links
HTML Frames
HTML Tables



HTML Lists
HTML Forms
HTML Images

HTML Background
HTML Colors




HTML Advanced
HTML Fonts
HTML Styles
HTML Head
HTML Meta

HTML Scripts
HTML Events


Building forms using HTML



To use HTML forms, you need to know how to write a FORM element, containing suitable fields. That's covered well in the tutorials mentioned below

What are forms used for?

Common uses of forms are surveys, on-line order forms, feedback, or really any Web page in which input is required from the user in order to accomplish a given task or provide a service to the user.

what is form?

A form is simply an area that can contain form fields. Form fields are objects that allow the visitor to enter information - for example text boxes, drop-down menus or radio buttons. When the visitor clicks a submit button, the content of the form is usually sent to a program that runs on the server.



Form elements

  • Every form starts with <form> and end with <form>
  • Every fields <input type="type" /> should have name and id attributes as well
  • Every form required a SUBMIT button that send the form data to the address specified in the action attributes of the <form> tage.


Form example With textarea





OUTPUT
First name:
Last name:

Radio buttons

output
visa
mastercard

Checkboxes

output
visa
Master card

The Form's Action Attribute and the Submit Button



When the user clicks on the "Submit" button, the content of the form is sent to another file. The form's action attribute defines the name of the file to send the content to. The defined files takes the vales of the form and create dynamic pages with the help of ASP,OR PHP,OR JSP
output
Username:
password:

Form Tags

Tag Description
<form> Defines a form for user input
<input> Defines an input field
<textarea> Defines a text-area (a multi-line text input control)
<label> Defines a label to a control
<fieldset> Defines a fieldset
<legend> Defines a caption for a fieldset
<select> Defines a selectable list (a drop-down box)
<optgroup> Defines an option group
<option> Defines an option in the drop-down box
<button> Defines a push button
<isindex> Deprecated. Use <input> instead

web hosting


iPower