1.
A website can be made up of one webpage.
Correct Answer
A. True
Explanation
A website can indeed be made up of just one webpage. While many websites consist of multiple interconnected pages, there are instances where a single webpage serves the entire purpose of the site. This is often the case with simple sites like online portfolios, single-product promotions, or landing pages. Despite being a single page, it can still include various elements like text, images, videos, and links to provide a complete user experience.
2.
What are the currently used languages for making webpages?
Correct Answer
E. All of the above
Explanation
HTML (HyperText Markup Language) and CSS (Cascading Style Sheets) are the primary languages used for creating and styling webpages. XML (eXtensible Markup Language) and XHTML (eXtensible HyperText Markup Language) are also used in web development. HTML provides the structure of the webpage, CSS is used for layout and design, XML is often used for data storage and transport, and XHTML is a stricter version of HTML that follows XML syntax rules. All these languages play important roles in various aspects of web development.
3.
How does the web browser differentiate code from normal English words?
Correct Answer
D. By putting the information in < tag > marks
Explanation
A web browser differentiates code from normal English words by recognizing information within < tag > marks, which are HTML tags. These tags tell the browser how to interpret and display the content. For example, <p> marks the beginning of a paragraph, while </p> marks the end. HTML tags define the structure and format of the webpage, allowing the browser to render it correctly. Tags are a fundamental part of HTML and are essential for creating structured web content.
4.
Can you make "white space" appear on a browser? How?
Correct Answer
A. Yes, by using special HTML tags.
Explanation
Yes, you can make "white space" appear on a browser by using special HTML tags. Normally, browsers collapse multiple spaces and line breaks into a single space. To preserve white space, you can use the <pre> tag, which maintains the formatting exactly as it is typed, or use CSS properties like white-space: pre to achieve the same effect. These methods ensure that white spaces are displayed as intended on the webpage.
5.
HTML5 introduced the <canvas> element for drawing graphics via scripting.
Correct Answer
A. True
Explanation
HTML5 introduced the <canvas> element, which allows for drawing graphics via JavaScript. This element provides a resolution-dependent bitmap canvas that can be used for rendering graphs, game graphics, or other visual images. It supports dynamic, scriptable rendering of 2D shapes and bitmap images, making it a powerful tool for web developers to create complex graphics without relying on external plugins.
6.
CSS Grid Layout is a one-dimensional layout method for the web.
Correct Answer
B. False
Explanation
CSS Grid Layout is a two-dimensional layout method for the web, allowing for both rows and columns. Unlike CSS Flexbox, which is primarily one-dimensional (focusing on either row or column layout), CSS Grid can handle complex layouts involving both dimensions, providing more control and flexibility in designing web page structures.
7.
WebAssembly is a low-level language that runs alongside JavaScript in modern web browsers.
Correct Answer
A. True
Explanation
WebAssembly is a low-level, binary instruction format designed for efficient execution and compact representation. It runs alongside JavaScript in modern web browsers, allowing code written in multiple languages (like C, C++, and Rust) to run at near-native speed. WebAssembly enhances performance for computationally intensive tasks, complementing JavaScript in web applications.
8.
Service workers can intercept and handle network requests, enabling offline capabilities for web applications.
Correct Answer
A. True
Explanation
Service workers are a type of web worker that intercepts and handles network requests, enabling offline capabilities and other advanced features for web applications. They run in the background, separate from the web page, allowing for caching of resources and background synchronization. This enables web applications to function offline or with unreliable network connections by serving cached content.
9.
HTTP/2 significantly reduces the latency by allowing multiple simultaneous requests over a single TCP connection.
Correct Answer
A. True
Explanation
HTTP/2 significantly reduces latency by allowing multiple simultaneous requests over a single TCP connection. This is achieved through multiplexing, where multiple streams of data are sent concurrently over a single connection, unlike HTTP/1.1, which requires a separate connection for each request/response pair. HTTP/2 also includes features like header compression and server push, further improving performance and efficiency.
10.
Progressive Web Apps (PWAs) require a constant internet connection to function.
Correct Answer
B. False
Explanation
Progressive Web Apps (PWAs) do not require a constant internet connection to function. They are designed to work offline or with unreliable network connections by leveraging technologies like service workers for caching resources and enabling background processes. PWAs provide a native app-like experience with features like offline access, push notifications, and fast loading times, even in low or no connectivity scenarios.