FBISE, NCP & NBF-aligned resources for Classes 9–12
Browse by Class
Browse by Type
Computer Chapter 3 : Topic 3.4
CSS properties that can be changed with JavaScript
1 / 10
A student creates a button that changes the color of a heading when it is clicked without reloading the webpage. Which CSS property is JavaScript modifying?
Reasoning: JavaScript can dynamically change the text color of HTML elements through CSS properties.
2 / 10
A webpage allows users to switch between light mode and dark mode by clicking a button. Which aspect of CSS is most likely being changed by JavaScript?
Reasoning: Dark mode is usually implemented by changing CSS color properties.
3 / 10
A user clicks a button to increase the size of the text displayed on a webpage. Which CSS property can JavaScript modify to achieve this?
Reasoning: JavaScript can change the font-size property dynamically.
4 / 10
A web application highlights an input field with a red border when invalid data is entered. Which CSS property is being changed?
Reasoning: JavaScript can modify border properties to provide visual feedback.
5 / 10
A student writes JavaScript code that hides an image when a button is clicked. Which CSS property is most likely modified?
Reasoning: Elements are commonly hidden by changing the display or visibility property.
6 / 10
A webpage automatically moves a notification box to a different location on the screen. Which CSS aspect can JavaScript modify?
Reasoning: JavaScript can change CSS positioning properties such as top, left, and position.
7 / 10
A developer wants a button to become wider when the mouse pointer moves over it. Which CSS property can JavaScript change?
Reasoning: JavaScript can modify the width of elements dynamically.
8 / 10
A webpage changes the background image of a section based on user selection. Which CSS property is affected?
Reasoning: JavaScript can update the background-image CSS property.
9 / 10
A navigation menu becomes transparent when the user scrolls down the page. Which CSS property is likely modified by JavaScript?
Reasoning: The opacity property controls the transparency of an element.
10 / 10
A programmer uses JavaScript to make a hidden message appear gradually by changing its visual appearance. Which CSS-related capability is being used?
Reasoning: JavaScript can dynamically modify CSS properties to create visual effects.
Your score is
Restart quiz