Basic CSS Questions and Answers on “Miscellaneous CSS Constructs”.
1. Which of the following represents a comment?
a) /!– comments –!/
b) /! comments !/
c) /* comments */
d) None of the mentioned
Answer: c
Clarification: Comments can be placed within style sheets. Style sheets use the comment syntax used in C programming
2. A single _____________ rule can be used in an external sheet to define character set encoding of the style rules and values.
a) @media
b) @charset
c) @font-face
d) None of the mentioned
Answer: b
Clarification: None.
3. An ___________ rule can be used to define style rules for multiple media types in a single embedded style sheet
a) @media
b) @charset
c) @font-face
d) None of the mentioned
Answer: a
Clarification: None.
4. An ___________ rule is used to define a page block for printed styles.
a) @important
b) @page
c) @css
d) @html
Answer: b
Clarification: An @page rule is used to define a page block for printed styles. Generally, within this construct we see various CSS properties like size, page, and margin to control the dimensions of the page.
5. Which of the following construct specifies that a style takes precedence over any different, conflicting styles?
a) !important b) <style> c) #id d) @media
View Answer
Answer: a
Clarification: None.
6. Which of the following property specifies the size of the mask?
a) box-sizing
b) box-shadow
c) box-reflect
d) none of the mentioned
Answer: c
Clarification:
Syntax: -webkit-box-reflect: direction offset mask-box-image
7. Which of the following property is used to control column element breaks after an associated element when flowing multicolumn text?
a) column-break
b) column-break-after
c) column-count
d) column-break-before
Answer: b
Clarification:
Syntax: column-break-after: always | auto | avoid
8. Which of the following property defines the gap between columns in a multicolumn text flow?
a) column-float
b) column-flow
c) column-gap
d) column-width
Answer: c
Clarification:
Syntax: column-gap: length | normal
9. Which of the following property defines the style, width, and color of the rule divider between
columns in a multicolumn text flow?
a) column
b) column-rule
c) column-change
d) column-check
Answer: b
Clarification:
Syntax: column-rule: rule-width rule-style color
10. Which of the following property defines the width of a rule between columns in a multicolumn text flow?
a) column-width
b) column-rule
c) column-float
d) column-rule-width
Answer: d
Clarification:
Syntax: column-rule-width: non-negative length | medium | thick | thin | inherit