Web Technologies MCQs: 10 Solved Questions with Explanations
Solve ten Web Technologies MCQs, then check each answer through the web layer responsible for it. The set covers CSS, the DOM, AJAX, sessions, services and XML.
KnowledgeGate Team
Exam prep & CS education

Web Technologies MCQs can look like vocabulary tests, but close distractors usually differ by layer. HTML describes structure, CSS styles it, JavaScript changes the document in the browser, and a server-side session preserves user-specific state across requests.
Web technologies span page presentation, browser APIs, client-server state and XML. Answer each question before revealing the solution, and name the layer responsible for every option. Use the Web Technologies PYQ Questions hub for more practice and for Questions 1, 6 and 7, which do not yet have individual solved pages.
Trace one browser action through the web stack
A browser opens https://learn.example/quiz/42. The server returns HTML containing <button id="submit">Submit</button>, then CSS applies #submit { color: #fff; background: #0b57d0; }. JavaScript finds that element through document.getElementById("submit").
When the user clicks, an asynchronous request sends {"selectedOption":2} to /api/attempts/42. The cookie sid=S-7F3A lets the server associate the request with a session. It replies {"saved":true,"attempt":4} without a full-page reload. Together, these steps show how the web stack works across layers.
Layer | Exact artefact | Job | MCQs it unlocks |
|---|---|---|---|
HTML |
| Defines structure | 1 |
CSS |
| Controls presentation | 1, 3 |
Document and JavaScript |
| Reads or changes the DOM | 2, 3 |
AJAX |
| Exchanges data in the background | 4 |
Server session |
| Connects requests to user-specific state | 6 |
The URL identifies the resource, HTML and CSS form its visible page, browser JavaScript reacts to the click, AJAX carries the update, and the server session preserves continuity. Each layer has a different job.
AJAX, cookies, validation and the browser-server boundary form the core of Server-Side Scripting MCQs: 12 Solved Web Questions. Web technologies also require the wider relationship among HTML, CSS, the DOM, browser APIs, sessions, web services and XML.

MCQs 1-2: presentation and the Document object
Question 1
Which web technology is responsible for styling web pages?
वेब पेजों (web pages) को स्टाइल करने (styling) के लिए कौन-सी वेब तकनीक जिम्मेदार होती है?
[0] HTML
[1] CSS
[2] PHP
[3] JavaScriptAnswer: [1] CSS.
In <p class="notice">Ready</p>, HTML supplies the paragraph and class. The rule .notice { color: #0b57d0; font-weight: 700; } controls presentation. JavaScript can change content or behaviour, while PHP runs on the server. “Styling web pages” makes CSS the direct match.
Question 2
UP LT Grade Assistant Teacher
Which object holds the real content of the page in JavaScript?
[0] Document
[1] Alert
[2] Location
[3] WindowAnswer: [0] Document (practice hub; individual question page unavailable).
Given <span id="score">0/10</span>, document.getElementById("score").textContent = "8/10" changes that DOM node. document represents the loaded page and its DOM. window is the broader browser context, location handles the URL, and alert is a dialog method.
MCQs 3-4: front-end categories and asynchronous updates
Question 3
UP LT Grade Assistant Teacher
Match List-I with List-II.
List-I
a) Front-end framework
b) Front-end asset
c) Front-end boilerplate
d) JavaScript library
List-II
i) React JS
ii) Tailwind CSS
iii) Font Awesome
iv) Reset CSS
[0] a-ii, b-iii, c-iv, d-i
[1] a-ii, b-i, c-iv, d-iii
[2] a-i, b-ii, c-iv, d-iii
[3] a-iii, b-i, c-iv, d-iiAnswer: [0] a-ii, b-iii, c-iv, d-i (practice hub; individual question page unavailable).
Tailwind CSS is the framework (bg-blue-600 text-white), Font Awesome supplies a check icon, Reset CSS provides a baseline (* { box-sizing: border-box; }), and React JS supplies a component (<Score value={8} />). Broader labels occur in projects, but these one-to-one roles select [0].
Question 4
UP LT Grade Assistant Teacher
What does AJAX stand for in ASP.NET?
[0] Asynchronous JavaScript and XML
[1] Associated JavaScript and XML
[2] Asynchronous JavaScript and HTML
[3] Associated JavaScript and HTMLAnswer: [0] Asynchronous JavaScript and XML (practice hub; individual question page unavailable).
It expands to Asynchronous JavaScript and XML. fetch("/api/users/42") may return {"name":"Asha"} while only <span id="user-name"> changes. XML remains in the historical name although current endpoints commonly return JSON. Asynchronous means the page continues while the request completes, without loading another full HTML page. Practise events and dynamic updates in the Complete JavaScript Course.
MCQs 5-7: browser permission, session state and web services
User 42 grants location access, starts attempt 4, and makes four requests carrying sid=S-7F3A. Keep browser capability, server-associated state and web-facing service separate.
Question 5
UP LT Grade Assistant Teacher
_____ lets users show their location with websites they trust.
[0] Geolocation
[1] Geotrust
[2] Loctrust
[3] OLTrustAnswer: [0] Geolocation (practice hub; individual question page unavailable).
After permission, navigator.geolocation.getCurrentPosition(...) might produce latitude 28.6139 and longitude 77.2090. Geolocation is the named browser capability; the other choices are not relevant Web API names. A website does not automatically receive precise location on every request.
Question 6
What is a session in web development?
[0] A type of HTTP request
[1] A way to store data on the client side
[2] A temporary storage for user-specific data during a browsing session
[3] A method to encrypt data for secure transmissionAnswer: [2] A temporary storage for user-specific data during a browsing session.
Trace request 1 -> login, request 2 -> open quiz 42, request 3 -> save option 2, and request 4 -> submit. The browser carries sid=S-7F3A; the server record holds {userId:42, quizId:42, savedOption:2}. The cookie identifies the session without storing the whole record. A session is not an HTTP method, client storage or encryption. The Node.js, Express.js & MongoDB Course covers APIs, middleware, authentication and persistent data.
Question 7
Which of the following is not a Web Service?
[0] Using Diksha learning portal
[1] Sending and receiving email
[2] File transfer over Bluetooth
[3] Using a banking portal for online transactionAnswer: [2] File transfer over Bluetooth.
The learning portal, email service and banking portal are Internet or web-facing services. Sending notes.pdf directly to a nearby laptop over Bluetooth uses a short-range device link, not a web service. This does not make every email protocol a browser application.
MCQs 8-9: what XML does, and what makes it valid
Question 8
UP LT Grade Assistant Teacher
Which of the following are correct statements with respect to XML?
(i) It is used to display data only.
(ii) XML can be used as a database.
(iii) XPATH is used to store the IP address of the server.
(iv) XLL definition is used along with XML to specify the links with other documents.
[0] Only (i) and (ii)
[1] Only (i), (ii) and (iii)
[2] Only (ii) and (iv)
[3] Only (iii) and (iv)Answer: [2] Only (ii) and (iv) (practice hub; individual question page unavailable).
<student id="42"><name>Asha</name></student> structures data, so (i) is false. XML can be persisted and queried as data, so (ii) is treated as true here. XPath /student/name selects a node; it does not store server IP 203.0.113.42, so (iii) is false. XLL is the XML linking-language family used to express links, making (iv) true here.
Question 9
UGC NET
Which of the following statements is/are true? P: An XML document with correct syntax as specified by W3C is called "well-formed". Q: An XML document validated against a DTD is both "well-formed" and "valid". R: <xml version="1.0" encoding="UTF-8"> is a syntactically correct declaration for the version of an XML document. Select the correct answer from the options given below:
[0] P and Q only
[1] P and R only
[2] Q and R only
[3] All of P, Q and RAnswer: [0] P and Q only (practice hub; individual question page unavailable).
P is true because correct syntax makes XML well-formed. Q is true because DTD validity requires a well-formed document that follows the declared grammar. R is false: <xml version="1.0" encoding="UTF-8"> lacks both question marks required by <?xml version="1.0" encoding="UTF-8"?>. Use Web Technologies for Teaching Exams: HTML and HTTP for broader terminology.
MCQ 10: read the aggregate condition in an XQuery
Question 10
SSC CGL Tier 2
Consider the following XML DTD describing course information in a university:
XML
<!ELEMENT Univ (Course+, Prof+)>
<!ELEMENT Course (Title, Eval*)>
<!ATTLIST Course Number ID #REQUIRED Instructor IDREF #IMPLIED>
<!ELEMENT Title (#PCDATA)>
<!ELEMENT Eval (#PCDATA)>
<!ATTLIST Eval Score CDATA #REQUIRED>
<!ELEMENT Prof EMPTY>
<!ATTLIST Prof Name ID #REQUIRED Teaches IDREF #IMPLIED>
What is returned by the following XQuery?
let $as := //@Score
for $c in /Univ/Course[Eval]
let $cs := $c/Eval/@Score
where min($cs) > avg($as)
return $c
[0] The professor with the lowest course evaluation
[1] Professors who have all their course evaluations above the university average
[2] The course with the lowest evaluation
[3] Courses with all evaluations above the university averageAnswer: [3] Courses with all evaluations above the university average.
Use C101: 80, 84, C102: 70, 95, and C103: 88, 92. The total is 80 + 84 + 70 + 95 + 88 + 92 = 509; the average is 509 / 6 = 84.83, rounded to two decimals. The course minima are 80, 70 and 88. Only C103 passes min(course scores) > 84.83, so every score in it is above the average.
The query iterates over and returns $c, so it returns Course elements, not Professor elements or a numeric minimum.

Short version: a layer-first checklist for the next MCQ
Identify the layer.
Separate structure from style.
Distinguish the Document from the Window.
Read AJAX as an interaction pattern, not a required response format.
Separate a session identifier from stored session data.
Test XML syntax before DTD validity.
#submit changing colour is CSS, document.getElementById("submit") is DOM access, /api/attempts/42 is the asynchronous request target, and sid=S-7F3A identifies the server-associated session. If you can assign all four without hesitation, the core confusions behind this set are under control.
Use the Complete JavaScript Course only if DOM and asynchronous-update questions were weak. If terminology questions were weak, return to Web Technologies for Teaching Exams: HTML and HTTP.
Keep learning
Web Technologies Explained: HTML, CSS, JavaScript and HTTP with Worked Examples
Connect HTML, CSS, JavaScript, DNS and HTTP by following one result page from its URL to its final DOM state after two button clicks.
Emerging Technologies in Web Technology: Cloud, IoT, Edge and Blockchain with Worked Examples
Follow 200 factory sensors from MQTT messages to edge decisions, cloud functions, a live dashboard and a toy blockchain. The worked numbers make each role concrete.
Web technologies for teaching exams: HTML, HTTP and the internet explained
Web technologies for teaching CS exams: HTML basics, the client-server model, HTTP and URLs, DNS, static versus dynamic pages, and web-authoring tools.
AI Technologies and Applications MCQs: 12 Solved Questions with Explanations
Solve 12 published-bank AI MCQs, then use concise explanations and worked examples to separate closely related concepts without memorising isolated answers.





