Top 20 HTML MCQ With Answers
1] <form> tag specifies where to send form data
A) action
B) enctype
C)method
D) target
Answer: A) action
2] <form> tag specifies how form data should be sent?
A) enctype
B) method action
C) method
D) name
Answer: C) method
3] What are the valid value for the method attribute
A) get, send
B)send, receive
C) get, post
D) send, post
Answer: C) get, post
3] default method if the method attribute is not specified?
A) POST DELETE
B) PUT
C) GET
D) POST
Answer: C) GET
4] Which input type is use for passwords?
A) text
B) password
C) secure
D) pass
Answer: B) password
5] Which element is used to create a dropdown menu in a form?
A) <dropdown>
B) <select>
C) <option>
D) <checkbox>
Answer: B) <select>
6] Which attribute makes an input field required?
A) required
B) mustfill
C) validate
D) mandatory
Answer: A) required
7] What input type allow users to select multiple options?
A) checkbox
B) button
C) text
D) radio
Answer: A) checkbox
8] What does the name attribute in an input tag
A) Gives a unique ID
B) Defines a CSS class
C) Identifies the input when sending data
D) Specifies the type of input
Answer: C) Identifies the input when sending data
9] create a multi-line text input field
A) <textarea>
B) <paragraph>
C) <text>
D) <paragraph>
Answer: A) <textarea>
11] Which tag groups form element together?
A) <group>
B) <fieldset>
C) <section>
D) <formgroup>
Answer: B) <fieldset>
12] What does the <legend>
A) Adds a title to a form
B) Groups options in a dropdown
C) Provides a caption for <fieldset>
D) Defines a label for an input
Answer: C) Provides a caption for <fieldset>
13] Which tag is use to define a label for an input field
A) <text>
B) <name>
C) <label>
D) <input>
Answer: C) <label>
15] How do you associate a label with an input field
A) Using for attribute in <label>
B) Using id attribute in <input>
C) Both A and B
Answer: C) Both A and B
16] input type restricts users to selecting a date
A) text
B) datetime
C) calendar
D) date
Answer: B) date
17] Which attribute sets a maximum value for an input field
A) max
B) value
C) limit
D) maximum
Answer: A) max
18] input type is used for numeric input
A) number
B) numeric
C) tex
D) integer
Answer: A) number
19] What does the <ol> tag stand
A) Ordered Listing
B) Ordered Link
C) Ordered List
D) Online List
Answer: C) Ordered List
20] Which tag is use to define an item inside an ordered list
A) <item>
B) <ol>
C) <li>
D) <ul>
No comments:
Post a Comment