CSS Questions & Answers – CSS3 Fundamentals

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

Answer: a
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

Answer: b
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

Answer: c
Explanation: Visit www.w3.org/TR/css3-gcpm to know more about it.
advertisement
advertisement

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

Answer: b
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

Answer: d
Explanation: Visit www.w3.org/TR/css3-values to know more about it.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. Which of the following selector is used to selects siblings?
a) ::after
b) E ~ F
c) :checked
d) E[attr^=value].
View Answer

Answer: b
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 */

advertisement

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

Answer: c
Explanation:

advertisement
: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
View Answer
Answer: d
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
View Answer
Answer: a
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
View Answer
Answer: d
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
View Answer
Answer: c
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

Answer: a
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]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.