Web Technologies

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?

  1. The server completed the request successfully
  2. The requested resource was not found
  3. The server permanently redirected the request
  4. 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?

  1. POST
  2. DELETE
  3. GET
  4. 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?

  1. Translate domain names to resource records such as IP addresses
  2. Encrypt every web request
  3. Store webpage source code
  4. 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?

  1. <p>
  2. <span>
  3. <h1>
  4. <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?

  1. margin
  2. padding
  3. display
  4. 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?

  1. Always an HTML element
  2. A JavaScript value represented by the JSON text
  3. Always a string identical to the input
  4. 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?

  1. All HTTP GET requests
  2. Cross-origin script access to protected resources and responses
  3. Use of CSS stylesheets
  4. 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?

  1. It guarantees the website has no vulnerabilities
  2. It enables TLS protection of data in transit
  3. It automatically improves every search ranking
  4. 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?

  1. The fragment after #
  2. The hostname within the authority component
  3. The query string after ?
  4. 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?

  1. To change styles based on device or viewport conditions
  2. To install a browser plugin
  3. To submit data to a server
  4. 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.