CSS Questions & Answers – Document Structure and CSS Inheritance

This set of CSS Questions and Answers for Experienced people focuses on “Document Structure and CSS Inheritance”.

1. If a particular rule should never be overridden by another rule, the ____________ indication should be used.

a) @important
b) !important!
c) !important
d) important!
View Answer
Answer: c
Explanation: If a particular rule should never be overridden by another rule, the !important indication should be used. For a rule never to be ignored, insert the indication !important just before the semicolon of the rule.
 
 

2. Which of the following option a rule consists of?
a) Tag
b) Selector
c) Declaration
d) Both Selector and Declaration
View Answer

Answer: d
Explanation: Self-explainatory.
advertisement
advertisement

3. Which of the following option a declaration consist of?
a) Tag
b) Property
c) Selector
d) Class
View Answer

Answer: b
Explanation: A declaration has two parts separated by a colon:
Property – that part before the colon
Value – that part after the colon.

4. The ______________ is the link between the HTML document and the style. It specifies what elements are affected by the declaration.
a) Tag
b) Selector
c) Declaration
d) Class
View Answer

Answer: b
Explanation: The selector is the link between the HTML document and the style. It specifies what elements are affected by the declaration. The declaration is that part of the rule that sets forth what the effect will be.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

5. How a style sheet can be glued to the HTML document?
a) Import a style sheet using the CSS @import notation.
b) Apply the basic, document-wide style sheet for the document by using the style element
c) Link an external style sheet to the document using the link elemen
d) All of the mentioned
View Answer

Answer: d
Explanation: Self-explainatory.

6. As a general rule, properties in CSS inherit from ___________ elements
a) child to parent
b) parent to child
c) grandparents to parents
d) none of the mentioned
View Answer

Answer: b
Explanation: Self-explainatory.
advertisement

7. CSS3 ___________ let you display smooth transitions between two or more specified colors
a) Float
b) Align
c) Gradients
d) Color
View Answer

Answer: b
Explanation: Earlier, you had to use images for these effects. However, by using CSS3 gradients you can reduce download time and bandwidth usage. In addition, elements with gradients look better when zoomed, because the gradient is generated by the browser.

8. The ___________________ property specifies whether or not an element should be resizable by the user.
a) Outline Offset
b) Resize
c) Unit
d) None of the mentioned
View Answer

Answer: b
Explanation: Self-explainatory.
advertisement

9. The __________ 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.
a) author
b) user
c) user-agent
d) none of the mentioned
View Answer

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

10.The __________ 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.
a) author
b) user
c) user-agent
d) none of the mentioned
View Answer

Answer: b
Explanation: 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) .

11. Each property may also have a cascaded value of ___________ which means that, for a given element, the property takes the same specified value as the property for the element’s parent.
a) !important
b) delay
c) inherit
d) important
View Answer

Answer: c
Explanation: Each property may also have a cascaded value of ‘inherit’, which means that, for a given element, the property takes the same specified value as the property for the element’s parent. The ‘inherit’ value can be used to enforce inheritance of values, and it can also be used on properties that are not normally inherited.

Sanfoundry Global Education & Learning Series – CSS.

To practice all areas of CSS for Experienced people, 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.