CSS Questions & Answers – Document Structure and CSS Inheritance

CSS Multiple Choice Questions & Answers (MCQs) focuses on “Document Structure and CSS Inheritance”.

Q 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!

Show Answer Answer:-C. ! important
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.

Q 2. Which of the following option a rule consists of?
A. Tag
B. Selector
C. Declaration
D. Both Selector and Declaration

Show Answer Answer:-D. Both Selector and Declaration
Explanation

Q 3. Which of the following option a declaration consist of?
A. Tag
B. Class
C. Selector
D. Property

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

Q 4. The ______________ is the link between the HTML document and the style. It specifies what elements are affected by the declaration.
A. Selector
B. Tag
C. Declaration
D. Class

Show Answer Answer:-A. Selector
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.

Q 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 element
D. All of the mentioned

Show Answer Answer:-D. All of the mentioned

Q 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

Show Answer Answer:-B. parent to child
Explanation Self-explainatory.

Q 7. CSS3 ___________ let you display smooth transitions between two or more specified colors
A. Align
B. Float
C. Gradients
D. Color

Show Answer Answer:-A. Align
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.

Q 8. The ___________________ property specifies whether or not an element should be resizable by the user.
A. Outline Offset
B. Unit
C. Resize
D. None of the mentioned

Show Answer Answer:-C. Resize
Explanation Self-explainatory.

Q 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. user
B. author
C. user-agent
D. none of the mentioned

Show Answer Answer:-B. author
Explanation 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.

Q 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

Show Answer Answer:-B. user
Explanation 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) .

Q 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. important
D. inherit

Show Answer Answer:-D. inherit
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.


Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

You cannot copy content of this page