CSS Questions and Answers Part-2

1. Which of the following element is used by the filter property to blur the images?
a) opaque()
b) scatter()
c) blur()
d) all of the mentioned

Answer: c
Explanation: Blurs an element, for use by the filter property. Accepts a distance measurement within which pixels are randomly scattered. A value of 0 leaves the image as is.

2. Which of the following function adjust the brightness of an element’s color, for use by the filter property?
a) contrast()
b) dark()
c) light()
d) brightness()

Answer: d
Explanation: A value of 100% or decimal value of 1 leaves the image as is, while 0 produces black. Increasing the value from 1 or 100% brightens pixels from their original values.

3. Which of the following function adjusts the difference between light and dark values, for use by the filter property?
a) contrast()
b) dark()
c) light()
d) brightness()

Answer: a
Explanation: A value of 100% or a decimal value of 1 leaves the image as is, while 0 results in black. Increasing the value past 1 or 100% produces more dramatically stratified areas of light and dark.

4. Which of the following function with filter property to create your own sophisticated effects on DOM elements?
a) create()
b) DOM()
c) custom()
d) none of the mentioned

Answer: c
Explanation: custom()

5. Which of the following function converts an element’s color to a shade of gray, for use by the filter property?
a) shade()
b) grayscale()
c) black()
d) brightness()

Answer: b
Explanation: A decimal value between 0 and 1 or percentage up to 100% controls the extent of the gray effect.

6. Which of the following function flips an element’s colors, for use by the filter property?
a) image()
b) flip()
c) invert()
d) contrast()

Answer: c
Explanation: A decimal value between 0 and 1 or percentage up to 100% controls the extent of the color-negative effect, with 0.5 or 50% producing gray.

7. Which of the following function applies a saturation effect to an element’s color, making it appear more or less vivid, for use by the filter property?
a) color()
b) saturation()
c) saturate()
d) none of the mentioned

Answer: b
Explanation: A decimal value of 1 or percentage of 100% keeps the image as is, while increasing the amount produces more dramatically stratified hues.

8. Which of the following function defines a linear gradient as a CSS image?
a) grayscale()
b) gradient()
c) image()
d) linear-gradient()

Answer: d
Explanation: linear-gradient()

9. Which of the following function two dimensional transformation in matrix format?
a) matrix()
b) matrix2d()
c) matrix3d()
d) perspective

Answer: a
Explanation: matrix()

10. Which of the following function apply a sepia tinge to an element’s color, typical of old photographs, for use by the filter property?
a) grayscale()
b) sepia()
c) contrast()
d) brightness()

Answer: b
Explanation: sepia()