FBISE, NCP & NBF-aligned resources for Classes 9–12
Browse by Class
Browse by Type
Computer Chapter 3 : Topic 3.3
JavaScript & HTML
1 / 13
A student wants a button click to change the heading text displayed on a webpage without reloading the page. Which aspect of HTML can JavaScript modify?
Reasoning: JavaScript can dynamically change the text content of HTML elements.
2 / 13
A web developer uses JavaScript to replace an image with another image when a user moves the mouse over it. Which HTML aspect is being modified?
Reasoning: JavaScript can change the src attribute of an image element.
3 / 13
A webpage hides a paragraph when a user clicks a button and shows it again when clicked a second time. Which HTML aspect is being changed?
Reasoning: JavaScript can show or hide HTML elements dynamically.
4 / 13
A student creates a script that changes the background color of a webpage based on user selection. What is JavaScript modifying?
Reasoning: JavaScript can modify style properties applied to HTML elements.
5 / 13
A form displays an error message when a required field is left empty. Which HTML aspect is JavaScript most likely changing?
Reasoning: JavaScript often changes text content to display validation messages.
6 / 13
A website allows users to enlarge or reduce text size using buttons. Which aspect of HTML is being modified?
Reasoning: JavaScript can change font size through style properties.
7 / 13
A programmer adds a new list item to an existing HTML list when a user submits data. What capability of JavaScript is being demonstrated?
Reasoning: JavaScript can create and insert new HTML elements into a webpage.
8 / 13
A button changes its label from "Login" to "Logout" after successful authentication. Which aspect of HTML is changed?
Reasoning: JavaScript can update the displayed text of buttons and other elements.
9 / 13
A student uses JavaScript to disable a submit button until all required fields are completed. Which HTML aspect is modified?
Reasoning: JavaScript can change attributes such as disabled.
10 / 13
A webpage displays additional information only after a user clicks "Read More." Which HTML feature is JavaScript primarily controlling?
Reasoning: JavaScript can control whether elements are shown or hidden.
11 / 13
A developer changes the hyperlink destination of a button based on user selection. Which HTML aspect is being modified?
Reasoning: JavaScript can update hyperlink attributes such as href.
12 / 13
A shopping website updates the number of items displayed in the cart immediately after a product is added. Which aspect of HTML is most likely changed?
Reasoning: JavaScript updates the displayed cart count by changing text content.
13 / 13
A programmer uses JavaScript to add a new paragraph to a webpage after a user presses a button. What does this demonstrate?
Reasoning: JavaScript can create, remove, and modify HTML elements dynamically, making webpages interactive.
Your score is
Restart quiz