Web Technologies
Introduction
Understand the technologies behind websites, browser interactions and web-based services.
Topic-Wise Overview
Web Foundations
HTTP, TCP/IP services, web servers, hosting and caching
Markup and Styling
HTML, CSS, XML and related standards
Browser Programming
JavaScript, dynamic pages, AJAX and JSON
Web Services
REST, SOAP, request and response processing
Security and Discovery
Cookies, privacy, server security, search and SEO
Study Guidance
Start with the core definitions, follow practical examples and check your understanding with independent exercises. Topic-wise MCQs, short questions and step-by-step solutions are planned for this subject.
Explore Other Subjects
Browse Computer Science subjects
Related Computer Science Resources
While the Web Technologies question bank is being developed, explore related published study pages:
Practice MCQs — Set 1 (Questions 1–10)
Choose the best answer, then open the explanation to check your reasoning.
Question 1. What does HTTP status code 404 indicate?
- The server completed the request successfully
- The requested resource was not found
- The server permanently redirected the request
- The client must authenticate
Show correct answer and explanation
Correct answer: B. The requested resource was not found
HTTP 404 means the server cannot find a resource matching the requested URL. It does not mean that the entire server is unavailable.
Question 2. Which HTTP method is normally used to retrieve a resource without requesting a state change?
- POST
- DELETE
- GET
- PATCH
Show correct answer and explanation
Correct answer: C. GET
GET retrieves a representation of a resource and is defined as a safe method. Applications should not use GET to trigger intended state-changing operations.
Question 3. What is the primary role of DNS in web communication?
- Translate domain names to resource records such as IP addresses
- Encrypt every web request
- Store webpage source code
- Compress HTML responses
Show correct answer and explanation
Correct answer: A. Translate domain names to resource records such as IP addresses
DNS maps names to records, including address records used to locate servers. Encryption and HTTP content delivery are separate mechanisms.
Question 4. Which HTML element marks the main heading of a document section?
- <p>
- <span>
- <h1>
- <meta>
Show correct answer and explanation
Correct answer: C. <h1>
The h1 element represents a top-level heading, usually the main heading of the page. Heading elements provide semantic structure for users and assistive technologies.
Question 5. Which CSS property controls the space between an element’s content and its border?
- margin
- padding
- display
- position
Show correct answer and explanation
Correct answer: B. padding
Padding creates space inside the border around the content box. Margin creates space outside an element’s border.
Question 6. What does JavaScript’s JSON.parse() return for a valid JSON object string?
- Always an HTML element
- A JavaScript value represented by the JSON text
- Always a string identical to the input
- An HTTP response object
Show correct answer and explanation
Correct answer: B. A JavaScript value represented by the JSON text
JSON.parse converts valid JSON text into corresponding JavaScript values. For an object-shaped JSON string, the result is a JavaScript object.
Question 7. What does the Same-Origin Policy primarily restrict in a browser?
- All HTTP GET requests
- Cross-origin script access to protected resources and responses
- Use of CSS stylesheets
- Rendering of HTML headings
Show correct answer and explanation
Correct answer: B. Cross-origin script access to protected resources and responses
The Same-Origin Policy restricts how documents and scripts from one origin interact with resources from another. CORS can explicitly grant certain cross-origin accesses.
Question 8. Why should a website use HTTPS?
- It guarantees the website has no vulnerabilities
- It enables TLS protection of data in transit
- It automatically improves every search ranking
- It eliminates the need for server authentication
Show correct answer and explanation
Correct answer: B. It enables TLS protection of data in transit
HTTPS uses TLS to authenticate the server and protect HTTP traffic against eavesdropping and tampering. It does not prevent all application security flaws.
Question 9. Which part of an HTTP URL identifies the server host?
- The fragment after #
- The hostname within the authority component
- The query string after ?
- The file extension
Show correct answer and explanation
Correct answer: B. The hostname within the authority component
In https://example.org/path, example.org is the hostname. The path, query and fragment identify other parts of the resource reference.
Question 10. What is the purpose of a responsive CSS media query?
- To change styles based on device or viewport conditions
- To install a browser plugin
- To submit data to a server
- To define an HTTP cookie
Show correct answer and explanation
Correct answer: A. To change styles based on device or viewport conditions
Media queries apply CSS rules when specified conditions, such as viewport width, match. They help adapt layouts to mobile and desktop screens.
