CSS Questions & Answers – CSS3 Fundamentals

CSS Multiple Choice Questions & Answers (MCQs) focuses on “CSS3 Fundamentals”.

Q 1. Which of the following Module is not available in CSS3.
A. Fonts
B. DOMs
C. Color
D. Backgrounds and Borders

Show Answer Answer:-B. DOMs
Explanation The Document Object Model (DOM) is a programming API for HTML and XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated.

Q 2. What module introduces the ability to modify CSS property values over time, such as position or color, to create animated layouts?
A. 3D Transforms
B. Animations
C. 2D Transforms
D. Box Model

Show Answer Answer:-B. Animations

Q 3. What module defines the management of generated content for print output, including crop mark indication, header/footer handling, and much more?
A. Behavioral Extensions
B. Generated and Replaced Content
C. Grid Positioning
D. Generated Content for Paged Media

Show Answer Answer:-D. Generated Content for Paged Media

Q 4. What module defines the handling of lists, including marker styles and some aspects of counters?
A. Line Layout
B. Lists
C. Media Queries
D. Namespaces

Show Answer Answer:-B. Lists

Q 5. What module expands the absolute and relative units of measure, including significant changes to support animation and aural changes with time (s and ms) and angle (deg and rad) values?
A. Values and Units
B. Template Layout
C. Web Fonts
D. Transitions

Show Answer Answer:-A. Values and Units

Q 6. Which of the following selector is used to selects siblings?
A. ::after
B. E ~ F
C. :checked
D. E[attr^=value].

Show Answer Answer:-B. E ~ F
Explanation p ~ strong {font-style: italic;} /* sets the font style to italic on all strong tags that have a p tag as a preceding sibling */

Q 7. Which of the following selector is used to selects the elements that are the default among a set of similar elements?
A. :default
B. :disabled
C. ::after
D. :checked

Show Answer Answer:-A. :default
Explanation :default {background-color: red;} /* sets the background color of a default button like a submit to red */

Q 8. Which of the following selector is used to selects the element that is the first child of its parent that is of its type?

A. :nth-child(n)
B. ::first-line
C. :last-of-type
D. :first-of-type
Show Answer Answer:-D. :first-of-type
Explanation strong:first-of-type {font-size: bigger;} /* sets the font size bigger on the first strong tag of its parent */
Q 9. Which of the following selector is used to selects the element that is the nth child of its parent?
A. :last-of-type
B. ::first-line
C. :nth-child(n)
D. :first-of-type
Show Answer Answer:-C. :nth-child(n)
Explanation div:nth-child(2) {background-color: red;} /* sets the background color to red if the div is its parent’s second child */
Q 10. Which of the following selector is used to selects the element that is the root of the document?
A. :only-of-type
B. :target
C. :root
D. ::selection
Show Answer Answer:-D. ::selection
Explanation :root {background-color: blue;} /* sets the background color to blue for the root element */
Q 11. Which of the following selector is used to select elements that are read-only. When applied to form elements, this would select fields with the readonly attribute set?
A. :valid
B. :target
C. :read-only
D. :required
Show Answer Answer:-C. :read-only
Explanation input:read-only {color: gray;} /* put all read only fields in gray */

Q 12. Which of the following measurement represent seconds?
A. s
B. se
C. sec
D. second

Show Answer Answer:-A. s
Explanation #a2 {transition-property: color; transition-duration: 1s;}


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

You cannot copy content of this page