Forms

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email

Form is a feature of HTML that allows the user to input data through HTML documents. HTML offers this mechanism to send information by uploading it to a web server. However, for a form to be processed, a program called Common Gateway Interface (CGI) script must be running on the Web server. CGI is a script program that allows the users to interact with a Web server. This script can be written in most computer languages.

To create a form, the

tag is used. It is a non-empty tag and has two attributes associated with it.

Method - Can be specified as GET (default) or POST (preferred) GET - attaches the input to the ACTION URL POST - sends the input in a data body separately Action - Specifies the path of the CGI script used to process the form. The <INPUT> tag is used to specify which input fields are available in the form. <INPUT> tag is an empty tag with three attributes.
TYPE This is set to TEXT, indicating a single text input fields.
There are other types like RADIO for radio button,
CHECKBOX for checkbox, BUTTON for button etc.,

<b>NAME</b> - This is a variable name for the text field that the author
must specify.
<b>SIZE </b> - This is the width of the TEXT field.

Let us create a basic form using the <FORM> and the <INPUT> tag.

The various value available for the <INPUT> tag are listed below.

TEXT - Specifies a text-entry field .

SIZE - Specifies the width of a text filed in characters.

MAXLENGTH - Specifies the maximum number of characters to be accepted.

CHECKBOX - Specifies a single toggle ON or OFF

RADIO - Specifies a single toggle ON or OFF

CHECKED - Specifies the element checked

VALUE - Indicates the user entered value

NAME - Specifies the name of the field

SUBMIT - Uploads the form to the server Resets form fields to defaults

The <SELECT> tag is used for creating lists and formatting the text fields. There are four attributes associated with the <SELECT> tag.

MULTIPLE - Indicates the number of elements in a list that can be displayed.

SIZE - Determines the number if items to be displayed in a list

OPTION - Defines each value within <SELECT> tag.

NAME - Indicates the name of the field.

The <TEXTAREA> tag is used as a text entry field with multiple rows. There are three attributes associated with the <TEXTAREA> tag.

ROWS - Specifies the height of the text field in characters.

COLS - Specifies the width of the text field in characters.

NAME - Specifies the name of the field. Now let us create a form involving all the above tags.

<html>
<head>
<title>Forms</title>
</head>
<body>
<h3 aligncenter>Simple Form</h3>
<form method=Post>
Enter the Name
<input type="text" NAME="Name" size="40">
<p>
Enter the E-mail
<Input Type="Text" Name="Mail" size="40">
<p>
</body>
</html>



Domain Name Search www.



Copyright (C) 2007. Web Domain design hosting. All rights reserved.