CodeHS Advanced HTML and CSS Practice test

Question: 1 / 400

What does the filter property achieve in CSS?

Modifies the layout of a webpage

Applies visual effects like blur and brightness

The filter property in CSS is designed to apply visual effects to elements on a webpage. It allows web designers to manipulate the appearance of images and other elements through various graphical effects such as blurring, changing brightness, contrast adjustments, grayscale filters, and creating other stylistic modifications.

For instance, using filter: blur(5px); on an image will soften the image by a specified radius, giving it a blurred appearance. Similarly, applying filter: brightness(150%); can enhance the brightness of an element, making it more prominent.

This property does not modify the layout of a webpage, add shadows, or change font sizes directly. Each of those functionalities is served by different CSS properties, such as margins and positioning for layout, box-shadow for shadows, and font-size for text size alterations. Hence, the function of the filter property is specifically aimed at visual effects rather than layout structure or text manipulation.

Get further explanation with Examzify DeepDiveBeta

Adds shadows to elements

Changes the font size of text

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy