CSS Questions & Answers – Miscellaneous

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

1. Which of the following is not a combinatory?
a) *
b) >
c) ~
d) +
View Answer

Answer: a
Explanation: Combinator explains the relationship between the selectors. There are four combinators in CSS, child selector (>), adjacent sibling selector(+), general sibling selector(~), descendent selector (space).

2. Which of the following selects all elements that are siblings of the specified element?
a) child selector
b) general sibling selector
c) adjacent sibling selector
d) descendant selector
View Answer

Answer: b
Explanation: General sibling selector selects all elements that are siblings of a specified element, adjacent sibling selector selects all elements that are adjacent siblings of the specified element, child selector selects all elements that are immediate children of the specified element.

3. Which of the following adds the value of a counter to an element?
a) counter-increment
b) content
c) counter()
d) counter-reset
View Answer

Answer: c
Explanation: counter() or counters() function adds value of counter to an element, content inserts generated content, counter-increment increments a counter value, counter-reset creates or resets a counter.
advertisement
advertisement

4. Which of the following specifies how to slice border image?
a) border-image
b) border-image-source
c) border-image-outset
d) border-image-slice
View Answer

Answer: d
Explanation: border-image-slice specifies how to slice border image, border-image-outset specifies the amount by which border image area extends beyond the border box, border-image is a shorthand property for setting all the border-image properties.

5. Which web font was developed by Apple and Microsoft in the late 1980s?
a) TTF
b) OTF
c) WOFF
d) WOFF 2.0
View Answer

Answer: a
Explanation: TrueType (TTF) is a font standard developed in the late 1980s by Microsoft and Apple. It is the most common font format for both Microsoft Windows and Mac OS operating systems.

Note: Join free Sanfoundry classes at Telegram or Youtube

6. Which of the following is a format for scalable computer fonts?
a) EOT
b) WOFF
c) OTF
d) WOFF 2.0
View Answer

Answer: c
Explanation: OpenType (OTF) is a format scalable for computer fonts, it was built on TrueType, and is a registered trademark of Microsoft. These fonts are used commonly today on major computer platforms.

7. Which font format is used in web pages?
a) WOFF 2.0
b) WOFF
c) SVG Fonts
d) EOT
View Answer

Answer: b
Explanation: WOFF is font format used in web pages. It was developed in 2009. It is essentially OpenType or TrueType with compression and additional metadata. The goal is to support font distribution from the server to client over the network with bandwidth constraints.
advertisement

8. What value lets animation to play forwards first then backward?
a) alternate
b) alternate-reverse
c) reverse
d) normal
View Answer

Answer: a
Explanation: When the value is set to alternate the animation is played forwards first then backward. When a value is set to alternate-reverse, the animation is played backward first, then forwards. At normal value the animation is played as normal, this is the default value.

9. Which value specifies animation with slow start?
a) ease-out
b) ease-in
c) linear
d) ease
View Answer

Answer: b
Explanation: ease-in specifies an animation with a slow start, ease-out specifies an animation with a slow end, linear specifies animation with same speed from start to end, ease specifies an animation with a slow start, then fast, then end slowly.
advertisement

10. How many values are there for animation-full-mode property?
a) 1
b) 2
c) 3
d) 4
View Answer

Answer: d
Explanation: animation-fill-mode property specifies the style for the target element when an animation is not playing. There are four values for this property namely none, forwards, backwards, and both. None is the default value.

11. Which of the following specifies animation code?
a) @keyframes
b) animation
c) animation-delay
d) animation-direction
View Answer

Answer: a
Explanation: Akeyframes specifies animation code, animation is shorthand property which sets all the animation property, animation-delay specifies the delay for start of the animation, animation-delay specifies a delay for start of the animation.

12. Which specifies the speed curve of animation?
a) animation-iteration-count
b) animation-name
c) animation-play-state
d) animation-timing-function
View Answer

Answer: d
Explanation: animation-timing-function specifies the speed curve of animation, animation-play-state specifies whether the animation is running or paused, animation-name specifies the name of @keyframes animation.

13. How many values are there for the object-fit property?
a) 2
b) 5
c) 3
d) 4
View Answer

Answer: b
Explanation: object-fit property can have 5 properties names fill, contain, cover, none, scale-down. The default value is fill, the replaced content is sized to fill element’s content box, with help of contain the replaced content is scaled to maintain its aspect ratio while fitting element’s content box.

14. Which property specifies the number of columns an element should be divided into?
a) column-rule
b) column-count
c) column-gap
d) column-fill
View Answer

Answer: b
Explanation: column-count specifies the number of columns an element should be divided into, column-fill specifies how to fill the columns, column-gap specifies the gap between columns, column-rule is for setting all the column-rule properties.

15. Which property is used for setting column-width and column-count?
a) columns
b) column-width
c) column-span
d) column-width-rule
View Answer

Answer: a
Explanation: columns is a shorthand property for setting column-width and column-count, column-width specifies suggested, optimal width for columns, column-span specifies how many columns an element should span across.

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.