Q
What CSS property is used to create a linear gradient background?

Answer & Solution

Answer: Option B
Solution:
The correct answer is linear-gradient. This CSS property is specifically used to create linear gradients for backgrounds, allowing for smooth transitions between colors along a straight line.
Related Questions on Average

What is the purpose of the background-size property in CSS when using multiple background images?

A). To set the color of the background

B). To adjust the size of each background image

C). To create a repeating pattern

D). To add padding to an element

What does the background-position property in CSS control?

A). The size of the background image

B). The position of the background image within its container

C). The color of the background

D). The repeat behavior of the background image

How do you specify an image as a background in CSS?

A). background: url('image.jpg')

B). background-image: url('image.jpg')

C). background-color: url('image.jpg')

D). image-background: url('image.jpg')

What does the background-image property do in CSS?

A). Sets the color of the text

B). Sets an image as the background

C). Adds a border around an element

D). Creates a shadow effect on an element

What is the purpose of the background-size property in CSS?

A). To set the color of the text

B). To adjust the size of the background image

C). To add padding to an element

D). To create a shadow effect on an element

Which CSS property allows you to define multiple background images for an element?

A). background-multiple

B). background-image

C). background-repeat

D). background-size

How can you make a background image stay fixed while the content scrolls on the page?

A). background-attachment: fixed;

B). background-attachment: scroll;

C). background-attachment: local;

D). background-attachment: inherit;

What CSS property is used to create repeating patterns as backgrounds?

A). background-pattern

B). background-repeat

C). background-image

D). background-size

How do you specify the size of each background image when using multiple background images?

A). background-size: auto;

B). background-size: 100% 100%;

C). background-size: cover;

D). background-size: contain;

How would you layer two background images on top of each other for an element?

A). background: url('image1.jpg'), url('image2.jpg');

B). background-image: url('image1.jpg'), url('image2.jpg');

C). background: url('image1.jpg') url('image2.jpg');

D). background: url('image1.jpg') + url('image2.jpg');