Page 76 - TP_Prime_V2.2_Class8
P. 76
The <FORM> Tag
The <FORM> tag is used to create the form boundary on a web page. It is a container tag.
All other form related tags are placed inside the opening <FORM> and closing </FORM>
tags.
The syntax to use the <FORM> tag is as follows:
Prime (Ver. 2.2)-VIII ...
<FORM>
...
(Form Elements)
...
...
</FORM>
Some commonly used attributes of the <FORM> tag are:
74
• ACTION: This attribute specifies the action that will take place when the form is
submitted. It takes the URL of another web page or an e-mail address to receive the
information.
• METHOD: This attribute specifies the type of method the form will use to submit the
entered values. The most commonly used values for this attribute are POST and GET.
• ENCTYPE: This attribute specifies the data encoding method a web browser uses before
sending it to the server. This attribute can take any of the following values:
♦ application/x-www-form-urlencoded: It is used when you want to encode the URL.
♦ multipart/form-data: It is used when you want to upload a file or image.
♦ text/plain: It is used to send the data without any encoding.
The <INPUT> Tag
The <INPUT> tag is one of the most important form elements. It is used to create controls
or fields to take input from the user in the form of text, selection and click. The <INPUT>
tag has the following attributes:
• NAME: This attribute is used to specify the identity of the field on the web page.
• TYPE: This attribute is used to specify the type of field we want to create. It takes one
of the predefined values. The predefined values for this attribute are:
♦ TEXT: This value is used to create a text box field. A text box field is a one-line text
input control. The text is the default value of the TYPE attribute.
♦ RADIO: This value is used to create a radio button control. A radio button control is
used to select only one option from a set of options.

