0% found this document useful (0 votes)
5 views

Forms in HTML

The document contains a series of multiple-choice questions, true/false statements, and fill-in-the-blank exercises related to HTML forms and their elements. It covers topics such as input types, attributes, and the structure of forms. Additionally, it includes practical exercises for creating various form elements in HTML.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Forms in HTML

The document contains a series of multiple-choice questions, true/false statements, and fill-in-the-blank exercises related to HTML forms and their elements. It covers topics such as input types, attributes, and the structure of forms. Additionally, it includes practical exercises for creating various form elements in HTML.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

FORMS IN HTML

Q1. Multiple choice questions:


1. What is the default type of 'type' attribute of <input> element?
Text
b. Password
Numerals
d. Special Characters
2. Which attribute defines the file-select field?
File
b. Checkbox
C. Button
d. Text
3. Choose the correct option.
HTML form elements are used for taking user input.
b. HTML form elements are defined inside <for> tag.
C. HTML form elements can be of different types.
d. All of these.

4. Which one of the following is a form element?


Text box.
b Radio button.
C. Submit button.
All of these.
5.) Which one of the following is incorrect?
<label> tag in HTML is used for creating a tag for form elements.
b <label> can be used to increase the clickable area of buttons
C. id attribute is used with <label> to increase the clickable area of form
elements
None of the above

COMPUTER WORKBOOK o CLASS VII 38


6 Which of the following tag is used for drop down list?
a <select>

b. <text>

<textarea>

d. <dropdown>
default?
7. Which attribute is used to display a radio button selected by
a Checked
b. Check

C. Select
d. selected

Q2. State True orFalse:


F(4op
You can create a Form in HTML by using <form create> Top of Form tag.
1. of
specify the width of the control in terms
2. The size attribute of input tag is used to
characters.
input control on the form. F
Text error tag is used to insert a single and
on the form.E
4. The input tag is used to input clickable buttons
on form to display a list of choices. T
5. Drop down tag is used to create afield
hide the characters that are entered by
6. The input field of password type in used to
the user. T
Q3. Match the following:
B
S.NO. A S.NO
Submit B A Used to setback the values of data entered in the
1 form to default values.
Radio B The values of data entered in the form is submitted
2 to the, file specified in the action attribute of the form
element using it.
3 Reset A Is used to add any type of textual dataldata.
Checkbox D HS used to select only one option from all the given
4
options.
Passwordf E Is used to select one or more than one options at a
5 time
Similar to text field, characters typed in it are not
6 TextC displayed

39 COMPUTER WORKBOOK " CLASS VII


FORMS IN HTML
Q1. Multiple choice questions.
1. Which of the following is a container used to collect diferent kinds of inputs from
the user?
Form
b. Web Page
C. Text

d. Input
available in a
2. HoWmany radio buttons can be selected from many radio buttons
single group?

b. 2

C. 3

d. 4

3. What appears in the shape of checkbox which is selected?


a. Line

b. Arrow
C. Dot

d Tick
4. What is the shape of radio button?
aCircle
b. Square
C. Triangle
d. Rectangle
5. Choose the incorrect option.
a. radio button allows to choose only one option from the given options.
heclke
b default option can be chosen using attribute "selected" in radio button
C.
default option can be chosen using attribute "checked" in radio button

d. checkbox allows to choose one or more than one options from the given
options.

41) COMPUTER WORKBOOK CLASS VIl


Q.2 Write the syntax of the following form elements.
a.

b.
Textbox: Sinpu type text"name"frsd_nome>
Checkbox:
Sioput type-"checkbox' nomesmaths'valueon
Submit button:
d
C

Drop down list:


input type 'Subait" valne-"sumit "
<Gelec d name dropdon' Kopthan value Saths'selectee
Password:
Kaput type'passcord'ià'ped name =pucl mahsop
f. Reset button:
Kinputype'reaet"y
Q3. Fill in the blanks:
a.
To add aform to apage, we will use the Hml tomelement
b. On clicking of eset_button, the values of data entered in the form are cleared
and set back to default values.

C. Check_ boxes are used when you want the user to select one or more of limited
number of choices.

d. toxtazeQ element is used to implement text area.


e. is the interface for the user used to collect user input or to enter data.
f. The characters typed inthe password field displayed in mbols. form.
Q4. Case based question:
Shekhar iscreating an HTML form for his project. You have to help him to add correct
form element in the following:
1. In the form below, add an input field with the type "button" and the value "OK".

<form>

><input type " butten' Value" Ok"


</form>

2. In the form below,add two radio buttons,both with the name "fav_language".
<form>

value="html"'> HTML <inpud type'rodi o'name- fav-lang uage"


value="css"> CSS
</form>

COMPUTERWORKBOOK e CLASS VIl 42


3. In the form below, add twO option elements to the drop down list.
<form action="/action_page.php">
<Select name e "drop doun'
<opticn Value mothy'>maths /opHon7
<option Value "Sciene) Seience </optioh
</form> <lselect
4. The first option must have the value "Volvo"
The second option must have the value "Ford".
<form action="laction_page.php">
<select name="cars">
=" volvo' vovo</option
>Volvos/ <opion value-H Fordfovd <lopten
>Fords/

</select>

</form>
"note".
5. In the form below, add atext area with the name
<form action="/action_page.php">
"n ote"ans'o" cols
<textaea name-
</form> <Itexteay
"username" .
6. In the form below, add an input field for text, with the name
<form action="/action_page.php">
type"tex"id ='username"pame-'use rnome ")
nput
</form>

7. In the form below, add a submit button with the value "Submit Form".
<form action="laction page.php">
<input type="text" name="username">
"
<input type Submid"value" Submit
<form>

8. Add two radio buttons with the name "color".


<form action="laction_page.php">
<input type=adio " rome'Co loy
43) COMPUTER WORKBOOK CLASS VII
Favorite color:
Blue

<input value="blue" Blue |


Red

<input value="red" > Red


<input type='submit">
</form>
9. In the form below, add a input field for button with the value "Click Me".
<form action="/action_page.php">

<nput type='butten"valve "click Me


<form>

10. Set the max numbers of characters allowed in the input field to 40.
<form action="laction_page.php">
<input type="text I max length "yo

COMPUTER WORKBOOK e CLASS VII 44)

You might also like