Web Technologies MCQs (Set-2)

Difficulty: Easy & Basic

HTTP response status codes communicate what about a request?

A CSS priority
B Request outcome
C Domain ownership
D Image format

For retrieving a representation, which HTTP method is intended?

A POST
B PATCH
C CONNECT
D GET

Where is JSON commonly exchanged?

A HTTP request body
B CSS selector
C URL fragment
D HTML comment

Which status code commonly signals a successful request?

A 301
B 404
C 200
D 503

Why might a browser send an Origin header?

A Sets response language
B Identifies request origin
C Chooses image size
D Names a CSS class

How does a media query help responsive design?

A Applies conditional CSS
B Compresses JavaScript
C Validates a password
D Creates a server

Among CSS layout systems, which arranges items along one main axis?

A Grid
B Float
C Table caption
D Flexbox

How does CSS Grid arrange content?

A HTTP headers
B Text alternatives
C Rows and columns
D DNS records

When is localStorage data normally retained?

A Only during one task
B Across browser restarts
C Until tab closes
D Only on servers

For a browsing tab, what data does sessionStorage hold?

A One browsing tab
B All websites
C Every device
D A DNS session

Which cookie attribute restricts cross-site sending?

A Content-Type
B Accept-Language
C SameSite
D Cache-Control

How does a CDN commonly improve delivery?

A Edits HTML semantics
B Replaces DNS globally
C Validates form fields
D Serves nearby cached content

Which standard attribute supplies an accessible name to a control?

A aria-label
B href
C srcset
D download

Resource not found is indicated by which status code?

A 200
B 404
C 301
D 503

When should POST be used to submit data for processing?

A GET
B HEAD
C POST
D TRACE

Why can a browser issue a CORS preflight request?

A Check cross-origin permission
B Refresh local storage
C Choose CSS cascade
D Resolve a fragment

In REST, what commonly identifies a resource?

A CSS class
B DOM event
C Cookie path
D URI

Which header describes a message body’s media type?

A Origin
B Content-Type
C Referer
D ETag

How does a 301 response affect a client?

A Temporary failure
B Successful creation
C Permanent redirection
D Unauthorized access

Before submission, what does client-side form validation check?

A Checks input before submission
B Encrypts response headers
C Routes server traffic
D Stores DNS records

On an HTML control, which attribute can make input mandatory?

A rel
B media
C scope
D required

When is a URL fragment identifier sent in an HTTP request?

A Only after redirects
B It is not sent
C With every POST
D Only over HTTPS

How can an image offer multiple resolutions?

A role attribute
B method attribute
C srcset attribute
D integrity attribute

Which resource hint can start a connection early?

A nofollow
B preload only
C manifest
D preconnect

Which media type does application/json name?

A JSON media type
B CSS language mode
C HTML document type
D WebSocket frame