Professional Documents
Culture Documents
Attribute Description
Name It specifies the name if the form
Method It specifies the how the form data is sent to the server. The
possible values are as follow
GET: it send the data as part of URL. The data include with
URL can be seen by other people. It also remembered by the
browser. It is the default value.
POST: it sends the data encoded in HTTP data stream. It is
mostly used to send a large amount of data. The data is
displayed in URL. There is more secure.
Action It specifies where the form data will be submitted. It is
normally sent to a script on the server or submitted as email.
<input type="radio"> Displays a radio button (for selecting one of many choices)
• Example:
• Name: <INPUT TYPE="text" NAME="name" VALUE= "---please type here---">
Password field
• Password fields are used to input passwords in the form. Each
character inserted in the field appears as *. The attributes are same
as text field.
• Example
• Enter Password: <input type ="password" name = "password">
Radio button
• Radio buttons are used when the user has to choose one option from
multiple choices.
Attribute Description
Name It specifies the name of the text field
Value It refers to the contents of the text field
Checked It specifies the radio button is selected by default
• Example:
<input type ="radio" name = "gender" value = "male" checked> Male
<input type ="radio" name = "gender" value = "female"> Female
Checkbox field
• Checkboxes are used to provide many options to the user. The user
can choose one or multiple options from available choices. The
attributes are same as radio button.
• Example:
<input type ="checkbox" name = "travel"> Traveling
<input type ="checkbox" name = "sports"> Sports
<input type ="checkbox" name = "chatting"> Chatting
Select field
• Select field is use to provide predefined list of items to user. The user
can select one or more options from the list.
• <select> tag is use to create the list.
• <option> tag is use to create an item in the list.
Example:
<select name = "city">
<option value= "Lahore" > Lahore
<option value= "Karachi" selected> Karachi
</select>
Text area field
• Text area field is use to text box but it may consist of multiple rows. It
is use to get lengthy input from the user.
• <textarea> tag is use to create text area in a form.
• Example:
<textarea>
Text here
</textarea>
Practical
• Write HTML code to design a feedback form to an author, the from
should accepts detailed data from the user. The data includes first
name, second name, gender, city and the books liked by the user.