Internet and Web Technologies MCQs

Computer

Internet and Web Technologies MCQs

Practice Internet MCQs covering WWW, browsers, search engines, URL, HTTP, HTTPS, email and web technologies with answers and explanations.

461
Total Questions

Practice Questions

Page 12 of 24
Question #221
What is the function of the 'autofocus' attribute in an HTML input field?
A. To clear the input value
B. To validate the input automatically
C. To automatically give focus to the input when the page loads
D. To set the input to read-only

Correct Answer: Option C


Explanation:
The autofocus attribute indicates that the input should automatically receive focus when the page loads, improving usability.

This question belongs to: Computer Internet and Web Technologies
Question #222
Which of the following is a protocol for managing the transfer of files over a network, often used in conjunction with HTTP?
A. SFTP
B. All of the above
C. FTP
D. FTPS

Correct Answer: Option B


Explanation:
FTP, SFTP, and FTPS are all file transfer protocols, each with varying security levels.

This question belongs to: Computer Internet and Web Technologies
Question #223
What is the purpose of the 'preload' attribute in an HTML tag?
A. To load a resource after page load
B. To preload the page in the background
C. To cache the resource
D. To indicate that a resource should be fetched early for performance

Correct Answer: Option D


Explanation:
The preload attribute tells the browser to download a resource (like a font or script) as soon as possible, improving performance.

This question belongs to: Computer Internet and Web Technologies
Question #224
Which of the following is a method to secure cookies against cross-site scripting attacks?
A. HttpOnly flag
B. SameSite flag
C. Secure flag
D. All of the above

Correct Answer: Option D


Explanation:
HttpOnly prevents client-side script access, Secure ensures transmission over HTTPS, and SameSite restricts cross-site requests, all enhancing cookie security.

This question belongs to: Computer Internet and Web Technologies
Question #225
What does the acronym 'API' stand for?
A. Application Programming Interface
B. Application Program Interface
C. Automated Program Interface
D. Advanced Programming Interface

Correct Answer: Option A


Explanation:
API stands for Application Programming Interface, a set of rules that allows software applications to communicate with each other.

This question belongs to: Computer Internet and Web Technologies
Question #226
Which of the following is a popular web technology for creating single-page applications?
A. AngularJS
B. All of the above
C. Vue.js
D. React

Correct Answer: Option B


Explanation:
React, AngularJS (and Angular), and Vue.js are all JavaScript frameworks/libraries commonly used for building single-page applications.

This question belongs to: Computer Internet and Web Technologies
Question #227
What is the function of the 'method' attribute in an HTML form?
A. To set the encoding type
B. To specify the HTTP method (GET or POST) for form submission
C. To enable validation
D. To define the action URL

Correct Answer: Option B


Explanation:
The method attribute defines the HTTP method to be used when submitting the form, either GET or POST.

This question belongs to: Computer Internet and Web Technologies
Question #228
Which of the following is a protocol used for sending email notifications from a web server to an administrator?
A. HTTP
B. SNMP
C. SMTP
D. FTP

Correct Answer: Option C


Explanation:
SMTP is used for sending email, including notifications from web servers to administrators.

This question belongs to: Computer Internet and Web Technologies
Question #229
What is the purpose of the 'WebP' image format?
A. To replace JPEG
B. To support transparency and animation
C. To provide superior compression and quality for web images
D. All of the above

Correct Answer: Option D


Explanation:
WebP is a modern image format that offers better compression than JPEG and PNG, with support for transparency and animation.

This question belongs to: Computer Internet and Web Technologies
Question #230
Which of the following is a common method to prevent clickjacking?
A. Content-Security-Policy with frame-ancestors
B. X-Frame-Options header
C. SameSite cookie attribute
D. Both A and B

Correct Answer: Option D


Explanation:
Both X-Frame-Options and CSP's frame-ancestors directive can be used to control iframe embedding, preventing clickjacking.

This question belongs to: Computer Internet and Web Technologies
Question #231
What is the function of a web bot (automated script) on the internet?
A. To interact with users in chat
B. To send emails
C. To perform automated tasks such as web scraping or indexing
D. To manage databases

Correct Answer: Option C


Explanation:
Web bots are automated scripts used for various tasks including crawling, scraping, monitoring, and automated form submission.

This question belongs to: Computer Internet and Web Technologies
Question #232
Which of the following is a popular open-source content management system (CMS) used for building websites?
A. WordPress
B. Joomla
C. Drupal
D. All of the above

Correct Answer: Option D


Explanation:
WordPress, Joomla, and Drupal are all popular open-source CMS platforms.

This question belongs to: Computer Internet and Web Technologies
Question #233
What is the purpose of the 'CORS' (Cross-Origin Resource Sharing) mechanism?
A. To block cross-origin requests
B. To authenticate cross-origin users
C. To encrypt cross-origin traffic
D. To allow a web page to request resources from a different domain

Correct Answer: Option D


Explanation:
CORS is a mechanism that uses additional HTTP headers to tell browsers to give a web application running at one origin access to resources from a different origin.

This question belongs to: Computer Internet and Web Technologies
Question #234
Which of the following is an example of a web protocol for pushing notifications from server to client?
A. All of the above
B. Server-Sent Events
C. WebSocket
D. Web Push API

Correct Answer: Option A


Explanation:
Web Push API, SSE, and WebSocket all enable server-to-client notifications, though they differ in implementation and use cases.

This question belongs to: Computer Internet and Web Technologies
Question #235
What is the role of the 'viewport' meta tag in responsive web design?
A. To set the zoom level
B. To disable scaling
C. All of the above
D. To adapt the page layout to different screen sizes

Correct Answer: Option C


Explanation:
The viewport meta tag controls the visible area and scaling for mobile devices, essential for responsive design.

This question belongs to: Computer Internet and Web Technologies
Question #236
Which of the following is a characteristic of a web service?
A. It uses standard web protocols (HTTP)
B. It is platform-independent
C. All of the above
D. It can be discovered via UDDI

Correct Answer: Option C


Explanation:
Web services are designed to interoperate over HTTP, are platform-agnostic, and can be published and discovered using standards like WSDL and UDDI.

This question belongs to: Computer Internet and Web Technologies
Question #237
What is the purpose of the 'HTTP Strict Transport Security' (HSTS) header?
A. To block HTTP requests
B. To redirect HTTP to HTTPS
C. Both A and C
D. To enforce the use of HTTPS

Correct Answer: Option C


Explanation:
HSTS tells the browser to always use HTTPS for a domain, preventing downgrade attacks and redirecting HTTP to HTTPS.

This question belongs to: Computer Internet and Web Technologies
Question #238
Which of the following is a type of web-based attack that exploits the trust a site has in a user's browser?
A. Session fixation
B. XSS
C. Clickjacking
D. CSRF

Correct Answer: Option D


Explanation:
CSRF exploits the trust a website has in the user's authenticated session, forcing the user to perform unwanted actions.

This question belongs to: Computer Internet and Web Technologies
Question #239
What is the function of the 'defer' attribute in a script tag?
A. To delay script execution until the page has parsed
B. To prevent script from running
C. To load the script after page load
D. To execute the script asynchronously

Correct Answer: Option A


Explanation:
The defer attribute tells the browser to continue parsing the HTML while the script downloads, and execute it after the document is parsed, in order.

This question belongs to: Computer Internet and Web Technologies
Question #240
What is the purpose of the 'rel=' preconnect' in HTML link tags?
A. To establish an early connection to an origin for future requests
B. To prefetch pages
C. To prerender pages
D. To preload critical assets

Correct Answer: Option A


Explanation:
preconnect tells the browser to perform early DNS resolution, TCP handshake, and TLS negotiation for a specified origin, improving performance for future requests.

This question belongs to: Computer Internet and Web Technologies