Q: 1 Which CSS property can provide to add an effect when changing from one style to another, without using flash animations or JavaScript?
Associations
Transitions
Transistor
None of the above
[ Option B ]
The CSS transition property allows you to add smooth effects when changing from one style to another without using flash animations or JavaScript. Transitions enhance user experience by providing visually appealing animations with minimal effort and without complex scripting.
It provides control over the duration, timing function, and delay of the change, enabling smooth gradual changes, such as fading colors, resizing elements, or moving components when a user interacts with a page.
button {
background-color: yellow;
transition: background-color 1s ease;
}
button:hover {
background-color: green;
}In this example, when the user hovers over the button, the background color smoothly changes from yellow to green in 1 seconds.
Q: 2 Which of the following is NOT true about Cascading Style Sheets (CSS)?
CSS can control the layout of multiple web pages
CSS supports style formatting in HTML pages
Style definitions can be saved in an external CSS file
Only one CSS can be used in a HTML file
[ Option D ]
CSS (Cascading Style Sheets) is used to control the presentation and layout of HTML documents. It separates content (HTML) from design (CSS), making web pages easier to manage and maintain.
| Statement | True / False | Explanation |
|---|---|---|
| CSS can control the layout of multiple web pages. | True | One external CSS file can be linked to many HTML pages. |
| CSS supports style formatting in HTML pages. | True | CSS is specifically designed for styling HTML elements. |
| Style definitions can be saved in an external CSS file. | True | External CSS files (.css) are commonly used. |
| Only one CSS can be used in a HTML file. | False | Multiple CSS files can be linked in one HTML document. |
CSS can be applied in three ways:
1. Inline CSS.
2. Internal CSS.
3. External CSS.
The term “Cascading” means:
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.