Version 3 2026, 260 Multiple-Choice
Questions with Rationales Table of Contents |
Quiz Format | Rationales | High-Yield Focus
TABLE OF CONTENTS
1.HTML & HTML5 (Questions 1–50)
2.CSS & CSS3 (Questions 51–100)
3.JavaScript Fundamentals (Questions 101–140)
4.JavaScript DOM Manipulation & Events (Questions 141–170)
5.JavaScript ES6+ Features (Questions 171–200)
6.APIs, AJAX, Fetch, JSON (Questions 201–230)
7.Web Performance, Security, Accessibility, Responsive
Design (Questions 231–260)
HTML & HTML5 (Questions 1–50)
Question 1
Which HTML element is used to define an independent, self-contained
piece of content that could be distributed or reused?
A. <section>
B. <article>
C. <div>
D. <aside>
Correct Answer: B
Rationale: <article> is for content that makes sense on its own (e.g.,
,forum post, news story). <section> (A) groups related content but is not
necessarily independent.
Question 2 (Select all that apply)
Which of the following are valid HTML5 elements for marking up
contact information or author details? (Select all that apply)
A. <address>
B. <author>
C. <contact>
D. <footer> (can contain address)
E. <info>
Correct Answers: A, D
Rationale: <address> is specifically for contact info. <footer> often
contains an <address>. <author> (B) and <contact> (C) are not valid
HTML elements.
Question 3
What is the correct HTML5 element for embedding an external
application or interactive content (like a Flash game)?
A. <embed>
B. <object>
C. Both A and B
D. <applet> (deprecated)
Correct Answer: C
Rationale: Both <embed> and <object> can embed external
content. <embed> is simpler; <object> is older but more flexible.
Question 4
What does the <param> element do inside an <object> element?
,A. Provides parameters (name-value pairs) to the embedded object
B. Provides parameters for the HTML page
C. Provides parameters for CSS
D. Provides parameters for JavaScript
Correct Answer: A
Rationale: <param name="autoplay" value="true"> is used
with <object> for plugins like Flash (now obsolete).
Question 5
Which input type is used for entering a telephone number in HTML5?
A. <input type="tel">
B. <input type="phone">
C. <input type="mobile">
D. <input type="call">
Correct Answer: A
Rationale: type="tel" does not enforce a specific format but shows a
numeric keypad on mobile devices.
Question 6 (Select all that apply)
Which of the following are valid values for the autocomplete attribute on
an <input> element? (Select all that apply)
A. on
B. off
C. name
D. email
E. street-address
Correct Answers: A, B, C, D, E
Rationale: autocomplete can be on/off or specific tokens
like name, email, street-address, tel, etc.
, Question 7
What is the purpose of the <optgroup> element in a <select> dropdown?
A. Groups related <option> elements with a label
B. Groups all options into one
C. Creates an option group for radio buttons
D. Creates a group of checkboxes
Correct Answer: A
Rationale: <optgroup label="Group 1"> visually groups options and
improves usability for long lists.
Question 8
How do you pre-select an option in a <select> dropdown?
A. <option selected>
B. <option checked>
C. <option default>
D. <option value="x" selected>
Correct Answers: A, D
Rationale: The selected attribute (boolean) pre-selects an option.
Question 9
Which element is used to display a list of terms and descriptions
(definition list)?
A. <dl>
B. <ul>
C. <ol>
D. <list>
Correct Answer: A
Rationale: <dl> (description list) contains <dt> (term)
and <dd> (description).