CSS Questions & Answers – Inheritance and Cascade

This set of CSS Multiple Choice Questions & Answers (MCQs) focuses on “Inheritance and Cascade”.

1. Which of the following are different origins of style sheets?
a) author
b) user
c) user agent
d) all of the mentioned
View Answer

Answer: d
Explanation: Author: The author specifies style sheets for a source document according to the conventions of the document language. For instance, in HTML, style sheets may be included in the document or linked externally.
User: The user may be able to specify style information for a particular document. For example, the user may specify a file that contains a style sheet or the user agent may provide an interface that generates a user style sheet (or behaves as if it did).
User agent: Conforming user agents must apply a default style sheet. A user agent’s default style sheet should present the elements of the document language in ways that satisfy general presentation expectations for the document language

2. Which of the following Cascading order has the highest precedence?
a) user agent declarations
b) user normal declarations
c) author normal declarations
d) author important declarations
View Answer

Answer: a
Explanation: Self-explainatory.

3. Which of the following property is used to define how nested items are rendered in a 3-D space?
a) transform-style
b) transform
c) transform-origin
d) transform-3D
View Answer

Answer: a
Explanation: transform-style is used to define how nested items are rendered in a 3-D space, the choice being either flattened or with their dimensions preserved. This property affects the children of the element and not the element itself. Also, the property does not cascade, so it is necessary to apply it at all levels.
advertisement
advertisement

4. Which of the following rule allows users to import style rules from other style sheets?
a) @media
b) @important
c) @import
d) @style
View Answer

Answer: c
Explanation: The @import rule allows users to import style rules from other style sheets. If an @import rule refers to a valid stylesheet, user agents must treat the contents of the stylesheet as if they were written in place of the @import rule.

5. Which of the following property is a shorthand that resets all CSS properties?
a) reset
b) inital
c) all
d) delete
View Answer

Answer: c
Explanation: Self-explainatory.

6. Which of the following generate “virtual” rules representing their effects when running?
a) DOM’s
b) !important
c) CSS Animations
d) Inheritance
View Answer

Answer: c
Explanation: Self-explainatory.

7. The _______________ is the result of taking the computed value and completing any remaining calculations to make it the absolute theoretical value used in the layout of the document.
a) cascaded value
b) declared value
c) used value
d) none of the mentioned
View Answer

Answer: c
Explanation: Self-explainatory.
advertisement

8. The _________________ is the result of resolving the specified value.
a) cascaded value
b) computed value
c) specified value
d) declared value
View Answer

Answer: b
Explanation: Self-explainatory.

9. The ____________ represents the result of the cascade: it is the declared value that wins the cascade.
a) specified Value
b) actual value
c) computed value
d) cascaded value
View Answer

Answer: d
Explanation: Self-explainatory.
advertisement

10. The CSS cascade assigns a weight to each style rule. State true or false.
a) True
b) False
View Answer

Answer: a
Explanation: Self-explainatory.

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.