This set of CSS Multiple Choice Questions & Answers (MCQs) focuses on “CSS3 Fundamentals”.
1. Which of the following Module is not available in CSS3.
a) DOMs
b) Fonts
c) Backgrounds and Borders
d) Color
View Answer
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.
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
View Answer
Explanation: Visit www.w3.org/TR/css3-animations to know more about it.
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) Generated Content for Paged Media
d) Grid Positioning
View Answer
Explanation: Visit www.w3.org/TR/css3-gcpm to know more about it.
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
View Answer
Explanation: Visit www.w3.org/TR/css3-lists to know more about it.
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) Transitions
b) Template Layout
c) Web Fonts
d) Values and Units
View Answer
Explanation: Visit www.w3.org/TR/css3-values to know more about it.
6. Which of the following selector is used to selects siblings?
a) ::after
b) E ~ F
c) :checked
d) E[attr^=value].
View Answer
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 */
7. Which of the following selector is used to selects the elements that are the default among a set of similar elements?
a) ::after
b) :disabled
c) :default
d) :checked
View Answer
Explanation:
:default {background-color: red;}
/* sets the background color of a default button like a submit to red */
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
Explanation:
strong:first-of-type {font-size: bigger;}
/* sets the font size bigger on the first strong tag of its parent */
9. Which of the following selector is used to selects the element that is the nth child of its parent?
a) :nth-child(n) b) ::first-line c) :last-of-type d) :first-of-type
Explanation:
div:nth-child(2) {background-color: red;}
/* sets the background color to red if the div is its parent’s second child */
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
Explanation:
:root {background-color: blue;}
/* sets the background color to blue for the root element */
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
Explanation: input:read-only {color: gray;}
/* put all read only fields in gray */
12. Which of the following measurement represent seconds?
a) s
b) se
c) sec
d) second
View Answer
Explanation: Example:
#a2 {transition-property: color; transition-duration: 1s;}
Sanfoundry Global Education & Learning Series – CSS.
To practice all areas of CSS, here is complete set of 1000+ Multiple Choice Questions and Answers.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Apply for Computer Science Internship
- Practice HTML MCQ
- Check CSS Books
- Practice MCA MCQs
- Practice Information Science MCQs