Which CSS code applies a grayscale filter to all images?

Study for the CodeHS Web Design (Picasso) Test. Prepare with flashcards and interactive multiple choice questions, each question supported by hints and explanations. Ace your exam!

The code that applies a grayscale filter to all images is correct because the filter property in CSS allows you to manipulate the rendering of images and other elements. The grayscale() function specifically converts the colors of an image to shades of gray. When you use grayscale(100%), it applies a full grayscale effect, resulting in the image displaying only in black and white, with no color information left.

The other options utilize different filter functions that do not result in a grayscale effect. The brightness() filter adjusts the lightness of the image, contrast() modifies the difference between the lightest and darkest parts, and sepia() gives a brownish tone to the image, all of which are distinct from transforming an image into grayscale.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy