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. DOMsExplanation
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. AnimationsQ 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 MediaQ 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. ListsQ 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 UnitsQ 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 ~ FExplanation
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. :defaultExplanation
: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-typeExplanation
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. ::selectionExplanation
: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-onlyExplanation
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
Leave a Reply