What is the primary purpose of JavaScript in web development?
A Manage data
B Add interactivity
C Style web pages
D Structure content
JavaScript is used to make web pages interactive. It allows developers to add dynamic features like form validation, animations, and event handling, enhancing the user experience by responding to user actions without page reloads.
Which CSS property is used to change the text color?
A color
B text-color
C background-color
D font-color
The color property in CSS is used to change the color of text on a webpage. It helps developers customize the appearance of text to match the overall design and theme of the website.
What is the role of a web framework like React?
A Add server-side logic
B Style web pages
C Manage database
D Build user interfaces
React is a JavaScript library used to build user interfaces, specifically for single‐page applications. It enables developers to create reusable UI components and manage the state of applications efficiently, enhancing user interactions.
Which of these technologies is used to create a responsive web design?
A SQL
B CSS
C HTML
D JavaScript
CSS is used to create responsive web designs by using media queries that allow web pages to adapt to various screen sizes. This ensures an optimal user experience across desktops, tablets, and mobile devices.
Which JavaScript feature is used to handle asynchronous operations?
A Objects
B Arrays
C Promises
D Functions
Promises in JavaScript are used to handle asynchronous operations, allowing functions to execute code after a task completes, such as fetching data from a server or performing time-consuming operations without blocking the main thread.
Which of the following is a component of a web application’s backend?
A Node.js
B Vue.js
C Angular
D React
Node.js is a backend framework used to build scalable web applications. It allows developers to use JavaScript on the server-side, handling tasks such as managing databases, handling requests, and performing server-side logic.
What is the primary function of WebSockets in web development?
A Data storage
B Real-time communication
C Client-side scripting
D Styling web pages
WebSockets enable two-way, real-time communication between the client and server. They are essential for applications like live chats, online gaming, and real-time data feeds, allowing instant data exchange without the need for constant server requests.
Which of the following is used for building modern single-page applications (SPA)?
A React
B MySQL
C PHP
D Flask
React is a JavaScript library that facilitates the development of single-page applications (SPA). SPAs load a single HTML page and dynamically update content as the user interacts with the page, providing a fast and seamless experience.
Which method is used in JavaScript to handle HTTP requests?
A select()
B listen()
C query()
D fetch()
The fetch() method in JavaScript is used to make HTTP requests to a server. It returns a Promise, enabling asynchronous handling of the response and allowing data to be fetched from APIs or servers without reloading the page.
What does PWA stand for in web development?
A Public Web Application
B Progressive Web Application
C Private Web App
D Primary Web Application
Progressive Web Applications (PWAs) are web apps designed to offer a native app‐like experience. They are fast, reliable, and can work offline by caching content, providing better performance and usability for users.
What is the role of JavaScript frameworks like Angular?
A Manage user input
B Create databases
C Build dynamic UIs
D Handle server requests
Angular is a front‐end web framework that helps developers build dynamic and complex user interfaces. It provides tools for data binding, component-based architecture, and dependency injection, simplifying the development of web applications.
Which web technology is used for content management in websites?
A WordPress
B JavaScript
C Node.js
D React
WordPress is a content management system (CMS) that simplifies website creation and management. It allows users to create, manage, and update content through a user-friendly interface, making it ideal for blogs, e-commerce, and informational websites.
Which of the following is an advantage of using server-side rendering (SSR)?
A Faster server requests
B Improved SEO
C Better user interactivity
D Reduced page load time
Server-side rendering (SSR) generates a fully rendered page on the server and sends it to the client, which improves search engine optimization (SEO). Search engines can index content faster, improving visibility and search rankings.
Which JavaScript feature allows developers to store data in the browser?
A Arrays
B Objects
C LocalStorage
D Functions
LocalStorage is a web storage feature that allows data to be stored persistently in the browser. It provides key-value pairs and can be used for storing user preferences, session data, or caching content locally.
What does CSS Flexbox primarily help with?
A Page layout
B HTTP requests
C Data storage
D Event handling
CSS Flexbox is a layout model that enables developers to design responsive web pages by distributing space within a container. It allows for flexible and dynamic positioning of elements, adjusting their size and alignment based on available space.